﻿/* ===========================
   Shell índice PlanChat
   =========================== */

.plan-chat-shell {
    max-width: 1120px;
    border-radius: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(248, 250, 252, 0.9));
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(148, 163, 184, 0.25);
}

/* Botón volver (desktop) */
.plan-chat-back-btn {
    font-size: .8rem;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

    .plan-chat-back-btn:hover {
        transform: translateY(-1px);
        background: #ffffff;
        box-shadow: 0 18px 40px rgba(148, 163, 184, 0.45);
    }

/* ===========================
   Grid + cards
   =========================== */

.plan-card-grid {
    margin-top: 0.75rem;
}

/* Tarjeta candidata */
.plan-card {
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(148, 163, 184, 0.25);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
    position: relative;
}

    .plan-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.16), transparent 58%);
        opacity: 0;
        transition: opacity .2s ease;
        pointer-events: none;
    }

    .plan-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 18px 50px rgba(148, 163, 184, 0.40), 0 0 0 1px rgba(129, 140, 248, 0.20);
        border-color: rgba(129, 140, 248, 0.5);
    }

        .plan-card:hover::before {
            opacity: 1;
        }

/* Media con foto (altura consistente) */
.plan-card-media {
    position: relative;
    overflow: hidden;
}

.plan-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Placeholder cuando no hay foto */
.plan-card-img-placeholder {
    background: linear-gradient(135deg, #eef2ff, #fdf2ff);
    color: #6b7280;
}

/* Chip con nombre del plan */
.plan-card-chip {
    position: absolute;
    left: 0.9rem;
    bottom: 0.9rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    background: rgba(15, 23, 42, 0.88);
    color: #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.5);
}

/* Cuerpo tarjeta */
.plan-card-body {
    padding: 1rem 1.1rem 1.2rem;
}

.plan-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #111827;
}

.plan-card-subtitle {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

/* Texto descriptivo */
.plan-card-text {
    font-size: .82rem;
    line-height: 1.5;
}

/* ===========================
   Botón “Empezar chat”
   =========================== */

.plan-card-btn {
    position: relative;
    overflow: hidden;
    border: none;
    color: #f9fafb;
    background: linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    box-shadow: 0 14px 32px rgba(129, 140, 248, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    font-size: .88rem;
    padding: .5rem 1rem;
    z-index: 0;
    transform: translateY(0);
    transition: transform .15s ease, box-shadow .15s ease, filter .18s ease;
}

    .plan-card-btn::before {
        content: "";
        position: absolute;
        inset: -40%;
        background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.25), transparent 55%);
        opacity: 0;
        transition: opacity .2s ease, transform .2s ease;
        z-index: -1;
    }

    .plan-card-btn:hover::before {
        opacity: 1;
        transform: translate3d(10px, 10px, 0);
    }

    .plan-card-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 45px rgba(129, 140, 248, 0.75);
        filter: brightness(1.03);
    }

    .plan-card-btn:active {
        transform: translateY(0);
        box-shadow: 0 10px 25px rgba(129, 140, 248, 0.6);
    }

.plan-card-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===========================
   Empty state índice
   =========================== */

.plan-empty {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px dashed rgba(148, 163, 184, 0.7);
}

/* ===========================
   Header badge pulse (reusa el del chat)
   =========================== */

.chat-header-badge-pulse {
    position: relative;
}

    .chat-header-badge-pulse .chat-header-dot {
        position: relative;
    }

        .chat-header-badge-pulse .chat-header-dot::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: var(--color-success, #22c55e);
            animation: votico-pulse 1.4s ease-out infinite;
            opacity: 0.4;
        }

@keyframes votico-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ===========================
   Responsivo
   =========================== */

@media (max-width: 575.98px) {
    .plan-card-img {
        height: 180px;
    }

    .plan-card-body {
        padding: 0.9rem 1rem 1.1rem;
    }
}


/* ============================
   Pill premium de V (con robot)
   ============================ */

.assistant-pill {
    background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(236,72,153,0.14));
    border: 1px solid rgba(99,102,241,0.35);
    box-shadow: 0 10px 25px rgba(99,102,241,0.30);
    font-size: .78rem;
    backdrop-filter: blur(10px);
}

.assistant-pill-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(99,102,241,0.45);
    color: #ffffff;
    font-size: .9rem;
}

.assistant-pill-copy {
    line-height: 1.05;
}

.assistant-pill-label {
    font-weight: 800;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.assistant-pill-caption {
    font-size: .7rem;
    color: #4b5563;
}

.assistant-pill-avatar-letter {
    font-size: .9rem;
    font-weight: 800;
    color: #ffffff;
}

/* ============================
   Personaje V dentro de la card
   ============================ */

.assistant-character {
    position: relative;
    width: 52px;
    height: 52px;
}

    .assistant-character::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 999px;
        background: radial-gradient(circle at 30% 0, rgba(255,255,255,0.45), transparent 55%);
        opacity: .9;
        pointer-events: none;
    }

.assistant-character-face {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 32px rgba(129,140,248,0.6);
}

.assistant-character-letter {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f9fafb;
}

/* Texto ya definido antes, lo reforzamos por si acaso */
.assistant-info-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}

.assistant-info-text {
    font-size: .85rem;
    color: #4b5563;
    line-height: 1.55;
}



/* ============================
   Card informativo del asistente
   ============================ */

.assistant-info-card {
    background: radial-gradient(circle at top left, rgba(129,140,248,0.12), transparent 55%), rgba(255,255,255,0.92);
    border: 1px solid rgba(148,163,184,0.35);
}

.assistant-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 10px 28px rgba(99,102,241,0.45);
}

.assistant-info-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}

.assistant-info-text {
    font-size: .85rem;
    color: #4b5563;
    line-height: 1.55;
}

/* ============================
   Hero dentro de assistant card
   ============================ */

.assistant-hero {
    max-width: 820px;
}

.assistant-hero-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.assistant-hero-subtitle {
    font-size: .95rem;
    color: #4b5563;
    line-height: 1.55;
}

/* Divider premium */
.assistant-divider {
    border: none;
    height: 1px;
    background: linear-gradient( to right, transparent, rgba(148,163,184,.6), transparent );
}

.assistant-section-divider {
    height: 1px;
    background: linear-gradient( to right, transparent, rgba(148,163,184,.4), transparent );
    margin: 1.25rem 0;
}

/* ============================
   Robot V saludando junto al badge
   ============================ */

.assistant-robot-greeting {
    width: 42px;
    height: 42px;
    position: relative;
}

.assistant-robot-circle {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0, rgba(255,255,255,0.6), transparent 55%), linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(129,140,248,0.6);
    animation: v-robot-wave 2.8s ease-in-out infinite;
    transform-origin: 50% 80%; /* para que parezca que saluda */
}

    .assistant-robot-circle i {
        font-size: 1.1rem;
    }

/* Animación: leve flotación + saludo (inclinación) */
@keyframes v-robot-wave {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    15% {
        transform: translateY(-2px) rotate(-6deg);
    }

    30% {
        transform: translateY(-2px) rotate(6deg);
    }

    45% {
        transform: translateY(-2px) rotate(-4deg);
    }

    60% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* ============================
   Card de candidato tipo perfil premium
   ============================ */

.profile-card {
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(148, 163, 184, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Cabecera degradada */
.profile-card-header {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.profile-card-header-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.35), transparent 55%), linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
}

/* Podríamos simular una pequeña ola en la base con border-radius */
.profile-card-header::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -38px; /* antes -26px */
    height: 56px; /* antes 48px */
    background: #ffffff;
    border-radius: 50% 50% 0 0;
}


/* Avatar circular que flota sobre la división */
.profile-card-avatar-wrapper {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    width: 130px; 
    height: 130px;
    border-radius: 999px;
    background: #f9fafb;
    padding: 4px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}


.profile-card-avatar-img,
.profile-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.profile-card-avatar-placeholder {
    color: #6b7280;
}

/* Cuerpo del card */
.profile-card-body {
    padding: 56px 1.5rem 1.5rem; /* 56px para compensar el avatar que invade el blanco */
    flex: 1 1 auto;
}

/* Tipografía y jerarquía */

.profile-card-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #111827;
}

.profile-card-party {
    font-size: .85rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-card-party-abbr {
    font-weight: 700;
}

/* Chip del nombre del plan (opcional) */
.profile-card-plan-chip {
    display: inline-block;
    text-align: center;
    align-items: center;
    padding: .2rem .75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    color: #4b5563;
    font-size: .75rem;
    font-weight: 500;
}

/* Botón premium */
.profile-card-btn {
    background: linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-accent, #ec4899));
    color: #ffffff;
    border: none;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
    font-size: .9rem;
}

    .profile-card-btn:hover {
        filter: brightness(1.03);
        box-shadow: 0 16px 40px rgba(99, 102, 241, 0.55);
        color: #ffffff;
    }

/* Descripción */
.profile-card-desc {
    line-height: 1.55;
}

/* Responsive pequeños ajustes */
@media (max-width: 575.98px) {
    .profile-card-body {
        padding-inline: 1.15rem;
    }
}

.assistant-video {
    max-width: 560px; /* ↓ tamaño (antes 720px) */
}

.assistant-video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
}

    .assistant-video-frame iframe {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 18px;
    }