/* =========================================================
   BOT FLOTANTE DE IA
   ========================================================= */

.modern-ai-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
}

.modern-ai-launcher {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--modern-blue);
    box-shadow: 0 16px 35px rgba(21, 94, 239, .30);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.modern-ai-launcher-spark {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    color: var(--modern-blue);
    background: #fff;
    font-size: 14px;
}

.modern-ai-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto;
    width: min(410px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid var(--modern-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(11, 32, 56, .24);
}

.modern-ai-panel[hidden] {
    display: none;
}

.modern-ai-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--modern-blue),
            #0b3c8f
        );
}

.modern-ai-panel > header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-ai-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--modern-blue);
    background: #fff;
    font-size: 18px;
}

.modern-ai-panel > header strong,
.modern-ai-panel > header small {
    display: block;
}

.modern-ai-panel > header small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .70);
    font-size: 8px;
}

.modern-ai-panel > header button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    font-size: 20px;
    cursor: pointer;
}

.modern-ai-messages {
    overflow: auto;
    padding: 15px;
    background: #f7f9fc;
}

.modern-ai-message {
    width: fit-content;
    max-width: 88%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.55;
}

.modern-ai-message.assistant {
    border-bottom-left-radius: 4px;
    color: #263b52;
    background: #fff;
    box-shadow: 0 5px 15px rgba(11, 32, 56, .06);
}

.modern-ai-message.user {
    margin-left: auto;
    border-bottom-right-radius: 4px;
    color: #fff;
    background: var(--modern-blue);
}

.modern-ai-results {
    display: grid;
    gap: 8px;
    margin: 8px 0 12px;
}

.modern-ai-result-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--modern-border);
    border-radius: 13px;
    color: inherit;
    background: #fff;
    text-decoration: none;
}

.modern-ai-result-card img,
.modern-ai-result-placeholder {
    width: 74px;
    height: 62px;
    border-radius: 9px;
    object-fit: cover;
}

.modern-ai-result-placeholder {
    display: grid;
    place-items: center;
    color: #6d8195;
    background: #e8eef5;
    font-size: 10px;
    font-weight: 900;
}

.modern-ai-result-card strong,
.modern-ai-result-card span,
.modern-ai-result-card small {
    display: block;
}

.modern-ai-result-card strong {
    overflow: hidden;
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-ai-result-card span {
    margin-top: 3px;
    color: var(--modern-blue);
    font-size: 10px;
    font-weight: 900;
}

.modern-ai-result-card small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--modern-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-ai-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    border-radius: 11px;
    color: #fff;
    background: var(--modern-blue);
    font-size: 10px;
    font-weight: 900;
    text-decoration: none;
}

.modern-ai-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 11px;
    border-top: 1px solid var(--modern-border);
    background: #fff;
}

.modern-ai-chat-form textarea {
    width: 100%;
    max-height: 110px;
    padding: 10px 11px;
    border: 1px solid var(--modern-border);
    border-radius: 12px;
    outline: 0;
    resize: none;
    font-size: 11px;
}

.modern-ai-chat-form textarea:focus {
    border-color: var(--modern-blue);
}

.modern-ai-chat-form button {
    width: 44px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--modern-blue);
    font-size: 19px;
    cursor: pointer;
}

@media (max-width: 1360px) {
    .modern-property-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .modern-property-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .modern-property-grid {
        grid-template-columns: 1fr;
    }

    .modern-search-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .modern-ai-launcher-text {
        display: none;
    }

    .modern-ai-launcher {
        width: 54px;
        height: 54px;
        padding: 0;
        justify-content: center;
    }

    .modern-ai-launcher-spark {
        width: 31px;
        height: 31px;
    }

    .modern-ai-panel {
        position: fixed;
        right: 12px;
        bottom: 84px;
        left: 12px;
        width: auto;
        height: min(600px, calc(100vh - 110px));
    }
}

.modern-cta-card h2,
.modern-advisor-copy h1 {
    color: #fff;
}

/* Respeta exactamente el tamaño configurado en escritorio. */
.modern-featured-heading h2 {
    font-size: var(--modern-featured-title-size);
}

.modern-latest-heading h2 {
    font-size: var(--modern-latest-title-size);
}

.modern-zones-heading h2 {
    font-size: var(--modern-zones-title-size);
}

@media (max-width: 680px) {
    .modern-featured-heading h2,
    .modern-latest-heading h2,
    .modern-zones-heading h2 {
        font-size: min(42px, 11vw);
    }
}


.modern-ai-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modern-ai-panel > header
.modern-ai-header-actions button {
    flex: 0 0 auto;
}

.modern-ai-reset {
    font-size: 17px !important;
}

.modern-ai-reset.is-working {
    animation: modernAiRotate .8s linear infinite;
}

@keyframes modernAiRotate {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   ASISTENTE IA — EXPERIENCIA MODERNA 2026
   ========================================================= */

.modern-ai-widget {
    --ai-panel-bg: rgba(248, 250, 253, .98);
    --ai-card-bg: rgba(255, 255, 255, .94);
    --ai-shadow:
        0 30px 80px rgba(8, 28, 61, .22),
        0 8px 24px rgba(8, 28, 61, .10);
}

.modern-ai-panel {
    width: min(440px, calc(100vw - 28px));
    height: min(690px, calc(100vh - 94px));
    border:
        1px solid
        rgba(255, 255, 255, .72);
    border-radius: 28px;
    background: var(--ai-panel-bg);
    box-shadow: var(--ai-shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.modern-ai-panel > header {
    position: relative;
    min-height: 72px;
    padding: 13px 15px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 18% -30%,
            rgba(255, 255, 255, .28),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            var(--modern-blue) 0%,
            #1849bc 56%,
            #0a327e 100%
        );
}

.modern-ai-panel > header::after {
    position: absolute;
    right: -38px;
    bottom: -58px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    content: '';
    background:
        rgba(255, 255, 255, .08);
    pointer-events: none;
}

.modern-ai-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    box-shadow:
        0 8px 22px
        rgba(5, 29, 74, .20);
}

.modern-ai-avatar::after {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    content: '';
    background: #22c55e;
    box-shadow:
        0 0 0 3px
        rgba(34, 197, 94, .16);
}

.modern-ai-panel > header strong {
    font-size: 14px;
    letter-spacing: -.15px;
}

.modern-ai-panel > header small {
    margin-top: 3px;
    font-size: 8px;
    letter-spacing: .1px;
}

.modern-ai-panel > header button {
    transition:
        transform .18s ease,
        background .18s ease;
}

.modern-ai-panel > header button:hover {
    background:
        rgba(255, 255, 255, .22);
    transform: translateY(-1px);
}

.modern-ai-disable-proactive {
    font-size: 15px !important;
    line-height: 1;
}

.modern-ai-messages {
    padding: 16px 14px 18px;
    background:
        radial-gradient(
            circle at top right,
            rgba(33, 102, 242, .055),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #f6f8fc 0%,
            #fbfcfe 100%
        );
    scrollbar-width: thin;
    scrollbar-color:
        rgba(67, 87, 119, .28)
        transparent;
}

.modern-ai-messages::-webkit-scrollbar {
    width: 6px;
}

.modern-ai-messages::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background:
        rgba(67, 87, 119, .24);
}

.modern-ai-message {
    position: relative;
    margin-bottom: 11px;
    padding: 11px 13px;
    border-radius: 17px;
    font-size: 11.5px;
    line-height: 1.58;
    animation:
        modernAiMessageIn
        .24s ease both;
}

.modern-ai-message.assistant {
    border:
        1px solid
        rgba(20, 48, 88, .045);
    border-bottom-left-radius: 6px;
    background:
        var(--ai-card-bg);
    box-shadow:
        0 7px 20px
        rgba(19, 42, 75, .055);
}

.modern-ai-message.user {
    border-bottom-right-radius: 6px;
    background:
        linear-gradient(
            135deg,
            #2567f4,
            var(--modern-blue)
        );
    box-shadow:
        0 8px 20px
        rgba(24, 84, 213, .19);
}

@keyframes modernAiMessageIn {
    from {
        opacity: 0;
        transform:
            translateY(6px)
            scale(.985);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

/* Indicador animado de pensamiento */
.modern-ai-thinking {
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 88%;
    gap: 8px;
    margin-bottom: 11px;
    padding: 11px 14px;
    border:
        1px solid
        rgba(20, 48, 88, .055);
    border-radius: 17px;
    border-bottom-left-radius: 6px;
    color: #52657a;
    background:
        rgba(255, 255, 255, .94);
    box-shadow:
        0 7px 20px
        rgba(19, 42, 75, .055);
    font-size: 10.5px;
    font-weight: 700;
    animation:
        modernAiMessageIn
        .22s ease both;
}

.modern-ai-thinking-spark {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 8px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--modern-blue),
            #6a8cff
        );
    box-shadow:
        0 5px 12px
        rgba(33, 102, 242, .18);
    animation:
        modernAiThinkingPulse
        1.35s ease-in-out infinite;
}

.modern-ai-thinking-copy {
    white-space: nowrap;
}

.modern-ai-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: -3px;
}

.modern-ai-thinking-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background:
        var(--modern-blue);
    animation:
        modernAiDot
        1.15s infinite ease-in-out;
}

.modern-ai-thinking-dots i:nth-child(2) {
    animation-delay: .14s;
}

.modern-ai-thinking-dots i:nth-child(3) {
    animation-delay: .28s;
}

@keyframes modernAiThinkingPulse {
    0%,
    100% {
        transform:
            scale(1)
            rotate(0deg);
    }

    50% {
        transform:
            scale(1.08)
            rotate(8deg);
    }
}

@keyframes modernAiDot {
    0%,
    60%,
    100% {
        opacity: .25;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.modern-ai-results {
    gap: 9px;
    margin: 8px 0 14px;
    animation:
        modernAiMessageIn
        .28s ease both;
}

.modern-ai-result-card {
    padding: 8px;
    border:
        1px solid
        rgba(29, 61, 104, .10);
    border-radius: 16px;
    background:
        rgba(255, 255, 255, .96);
    box-shadow:
        0 6px 17px
        rgba(21, 43, 75, .045);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.modern-ai-result-card:hover {
    border-color:
        rgba(33, 102, 242, .22);
    box-shadow:
        0 11px 25px
        rgba(21, 62, 132, .10);
    transform: translateY(-2px);
}

.modern-ai-result-card img,
.modern-ai-result-placeholder {
    border-radius: 11px;
}

.modern-ai-view-all {
    min-height: 44px;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            var(--modern-blue),
            #296af4
        );
    box-shadow:
        0 8px 20px
        rgba(33, 102, 242, .16);
    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.modern-ai-view-all:hover {
    box-shadow:
        0 12px 26px
        rgba(33, 102, 242, .24);
    transform: translateY(-1px);
}

.modern-ai-chat-form {
    align-items: end;
    grid-template-columns:
        minmax(0, 1fr)
        48px;
    gap: 9px;
    padding: 11px 12px 12px;
    border-top:
        1px solid
        rgba(32, 61, 100, .08);
    background:
        rgba(255, 255, 255, .97);
    box-shadow:
        0 -10px 28px
        rgba(19, 43, 77, .04);
}

.modern-ai-chat-form textarea {
    min-height: 46px;
    max-height: 116px;
    padding: 13px 14px;
    border:
        1px solid
        rgba(35, 69, 114, .16);
    border-radius: 17px;
    color: #20354c;
    background: #f9fbfe;
    box-shadow:
        inset 0 1px 2px
        rgba(13, 38, 72, .025);
    font-size: 11px;
    line-height: 1.45;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.modern-ai-chat-form textarea:focus {
    border-color:
        rgba(33, 102, 242, .68);
    background: #fff;
    box-shadow:
        0 0 0 4px
        rgba(33, 102, 242, .08);
}

.modern-ai-chat-form textarea:disabled {
    opacity: .72;
}

.modern-ai-chat-form button {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            #2b72ff,
            var(--modern-blue)
        );
    box-shadow:
        0 9px 20px
        rgba(33, 102, 242, .22);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        opacity .18s ease;
}

.modern-ai-chat-form button:hover:not(:disabled) {
    box-shadow:
        0 12px 24px
        rgba(33, 102, 242, .29);
    transform: translateY(-1px);
}

.modern-ai-chat-form button:disabled {
    opacity: .48;
    cursor: default;
}

@media (max-width: 680px) {
    .modern-ai-panel {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height:
            min(
                760px,
                calc(100dvh - 14px)
            );
        max-height:
            calc(100dvh - 14px);
        border-radius:
            24px 24px 0 0;
    }

    .modern-ai-widget {
        right: 12px;
        bottom: 12px;
    }

    .modern-ai-panel > header {
        min-height: 68px;
    }

    .modern-ai-thinking-copy {
        white-space: normal;
    }
}

@media (
    prefers-reduced-motion: reduce
) {
    .modern-ai-message,
    .modern-ai-results,
    .modern-ai-thinking,
    .modern-ai-thinking-spark,
    .modern-ai-thinking-dots i {
        animation: none !important;
    }
}


/* =========================================================
   RADAR PROACTIVO DE PROPIEDADES
   Mini experiencia previa al chat.
   ========================================================= */

.modern-ai-proactive {
    position: absolute;
    right: 0;
    bottom: 74px;
    z-index: 8;
    display: grid;
    grid-template-columns:
        62px minmax(0, 1fr);
    width: min(380px, calc(100vw - 30px));
    padding: 15px 16px 13px;
    overflow: hidden;
    border:
        1px solid
        rgba(255, 255, 255, .72);
    border-radius: 24px;
    opacity: 0;
    color: #16324f;
    background:
        radial-gradient(
            circle at 8% 0%,
            rgba(64, 117, 255, .18),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .98),
            rgba(244, 248, 255, .97)
        );
    box-shadow:
        0 28px 72px
        rgba(7, 34, 79, .24),
        0 8px 22px
        rgba(12, 51, 104, .09);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform:
        translateY(16px)
        scale(.96);
    transform-origin:
        bottom right;
    transition:
        opacity .32s ease,
        transform .32s
        cubic-bezier(.2, .8, .2, 1);
}

.modern-ai-proactive::before {
    position: absolute;
    top: -54px;
    right: -44px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    content: '';
    background:
        radial-gradient(
            circle,
            rgba(40, 105, 255, .10),
            transparent 68%
        );
    pointer-events: none;
}

.modern-ai-proactive.is-visible {
    opacity: 1;
    transform:
        translateY(0)
        scale(1);
}

.modern-ai-proactive.is-leaving {
    opacity: 0;
    transform:
        translateY(10px)
        scale(.97);
}

.modern-ai-proactive-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-top: 4px;
}

.modern-ai-proactive-orbit::before,
.modern-ai-proactive-orbit::after,
.modern-ai-proactive-orbit span {
    position: absolute;
    border:
        1px solid
        rgba(36, 103, 242, .19);
    border-radius: 50%;
    content: '';
}

.modern-ai-proactive-orbit::before {
    inset: 0;
    animation:
        modernAiRadarPulse
        2.8s ease-out infinite;
}

.modern-ai-proactive-orbit::after {
    inset: 8px;
    animation:
        modernAiRadarPulse
        2.8s .7s ease-out infinite;
}

.modern-ai-proactive-orbit span:nth-child(1) {
    inset: 15px;
    border: 0;
    background:
        rgba(37, 103, 244, .10);
}

.modern-ai-proactive-orbit span:nth-child(2) {
    top: 2px;
    right: 8px;
    width: 6px;
    height: 6px;
    border: 0;
    background: #2c73ff;
    box-shadow:
        0 0 0 5px
        rgba(44, 115, 255, .09);
    animation:
        modernAiRadarDot
        3.2s linear infinite;
}

.modern-ai-proactive-orbit span:nth-child(3) {
    bottom: 7px;
    left: 5px;
    width: 4px;
    height: 4px;
    border: 0;
    background: #65b8ff;
    animation:
        modernAiRadarDot
        3.2s 1.1s linear infinite;
}

.modern-ai-proactive-orbit strong {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 11px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #2f7cff,
            #1647b9
        );
    box-shadow:
        0 8px 18px
        rgba(31, 92, 214, .25);
    font-size: 15px;
    animation:
        modernAiRadarSpark
        2.4s ease-in-out infinite;
}

@keyframes modernAiRadarPulse {
    0% {
        opacity: .72;
        transform: scale(.72);
    }

    85%,
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

@keyframes modernAiRadarDot {
    0%,
    100% {
        opacity: .25;
        transform: scale(.8);
    }

    45% {
        opacity: 1;
        transform: scale(1.25);
    }
}

@keyframes modernAiRadarSpark {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(0deg);
    }

    50% {
        transform:
            translateY(-2px)
            rotate(8deg);
    }
}

.modern-ai-proactive-content {
    min-width: 0;
    padding-right: 7px;
}

.modern-ai-proactive-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #2564d9;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.25px;
}

.modern-ai-proactive-content > strong {
    display: block;
    color: #18324e;
    font-size: 14px;
    letter-spacing: -.18px;
}

.modern-ai-proactive-content > p {
    margin: 4px 0 10px;
    color: #66788d;
    font-size: 10.5px;
    line-height: 1.5;
}

.modern-ai-proactive-rail {
    width: 100%;
    overflow: hidden;
    mask-image:
        linear-gradient(
            90deg,
            transparent,
            #000 8%,
            #000 92%,
            transparent
        );
    -webkit-mask-image:
        linear-gradient(
            90deg,
            transparent,
            #000 8%,
            #000 92%,
            transparent
        );
}

.modern-ai-proactive-track {
    display: flex;
    width: max-content;
    gap: 7px;
    animation:
        modernAiSuggestionRail
        18s linear infinite;
}

.modern-ai-proactive:hover
.modern-ai-proactive-track {
    animation-play-state: paused;
}

.modern-ai-proactive-track button {
    min-height: 30px;
    padding: 6px 10px;
    border:
        1px solid
        rgba(36, 98, 211, .14);
    border-radius: 999px;
    color: #31516f;
    background:
        rgba(255, 255, 255, .86);
    box-shadow:
        0 3px 10px
        rgba(15, 50, 96, .04);
    font-size: 9.5px;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
    transition:
        border-color .18s ease,
        color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.modern-ai-proactive-track button:hover {
    border-color:
        rgba(34, 102, 241, .34);
    color: #1552c5;
    background: #fff;
    transform: translateY(-1px);
}

@keyframes modernAiSuggestionRail {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.modern-ai-proactive-footer {
    grid-column: 2;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.modern-ai-proactive-start {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #246bf4,
            #1749bd
        );
    box-shadow:
        0 7px 17px
        rgba(32, 92, 214, .18);
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.modern-ai-proactive-start span {
    transition:
        transform .18s ease;
}

.modern-ai-proactive-start:hover {
    box-shadow:
        0 10px 20px
        rgba(32, 92, 214, .25);
    transform: translateY(-1px);
}

.modern-ai-proactive-start:hover span {
    transform: translateX(3px);
}

.modern-ai-proactive-dismiss {
    position: absolute;
    top: 9px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 0;
    border-radius: 50%;
    color: #718197;
    background: transparent;
    font-size: 17px;
    cursor: pointer;
    transition:
        color .18s ease,
        background .18s ease;
}

.modern-ai-proactive-dismiss:hover {
    color: #1d4ca8;
    background:
        rgba(35, 103, 242, .07);
}

/*
 * El launcher respira suavemente mientras el teaser está disponible,
 * sin saltar ni molestar al visitante.
 */
.modern-ai-launcher {
    position: relative;
}

.modern-ai-launcher::before {
    position: absolute;
    inset: -5px;
    z-index: -1;
    border:
        1px solid
        rgba(37, 104, 244, .30);
    border-radius: inherit;
    content: '';
    opacity: 0;
    animation:
        modernAiLauncherAura
        3.4s ease-out infinite;
    pointer-events: none;
}

@keyframes modernAiLauncherAura {
    0% {
        opacity: .42;
        transform: scale(.96);
    }

    65%,
    100% {
        opacity: 0;
        transform: scale(1.12);
    }
}

@media (max-width: 680px) {
    .modern-ai-proactive {
        position: fixed;
        right: 12px;
        bottom: 78px;
        left: 12px;
        width: auto;
        grid-template-columns:
            54px minmax(0, 1fr);
        border-radius: 21px;
    }

    .modern-ai-proactive-orbit {
        width: 44px;
        height: 44px;
    }

    .modern-ai-proactive-content > strong {
        font-size: 13px;
    }

    .modern-ai-proactive-footer {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: 10px;
    }
}

@media (
    prefers-reduced-motion: reduce
) {
    .modern-ai-proactive-orbit::before,
    .modern-ai-proactive-orbit::after,
    .modern-ai-proactive-orbit span,
    .modern-ai-proactive-orbit strong,
    .modern-ai-proactive-track,
    .modern-ai-launcher::before {
        animation: none !important;
    }
}


/* =========================================================
   LAUNCHER IA VIVO — V2
   ========================================================= */

.modern-ai-launcher {
    position: relative;
    isolation: isolate;
    overflow: visible;
    min-height: 54px;
    padding:
        8px 16px 8px 9px;
    border:
        1px solid
        rgba(255, 255, 255, .42);
    border-radius: 999px;
    color: #fff;
    background:
        linear-gradient(
            120deg,
            #0d4bc5 0%,
            #1f69f4 42%,
            #6c4dff 72%,
            #0d4bc5 100%
        );
    background-size: 260% 260%;
    box-shadow:
        0 18px 34px
        rgba(17, 70, 181, .30),
        0 5px 14px
        rgba(12, 47, 113, .16);
    animation:
        modernAiLauncherGradient
        7s ease infinite,
        modernAiLauncherFloat
        3.6s ease-in-out infinite;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.modern-ai-launcher:hover {
    box-shadow:
        0 22px 42px
        rgba(17, 70, 181, .38),
        0 7px 18px
        rgba(12, 47, 113, .20);
    transform:
        translateY(-3px)
        scale(1.025);
}

.modern-ai-launcher::after {
    position: absolute;
    inset: 1px;
    z-index: -1;
    overflow: hidden;
    border-radius: inherit;
    content: '';
    background:
        linear-gradient(
            110deg,
            transparent 22%,
            rgba(255, 255, 255, .32) 45%,
            transparent 68%
        );
    background-size: 220% 100%;
    animation:
        modernAiLauncherShine
        3.8s linear infinite;
    pointer-events: none;
}

.modern-ai-launcher::before {
    position: absolute;
    inset: -7px;
    z-index: -2;
    border:
        1px solid
        rgba(77, 135, 255, .34);
    border-radius: inherit;
    content: '';
    opacity: .7;
    animation:
        modernAiLauncherSignal
        2.8s ease-out infinite;
    pointer-events: none;
}

.modern-ai-launcher-icon,
.modern-ai-launcher > span:first-child {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 14px;
    color: #1b5ed8;
    background: #fff;
    box-shadow:
        0 7px 16px
        rgba(8, 42, 105, .17);
}

.modern-ai-launcher-icon::before,
.modern-ai-launcher > span:first-child::before {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: '';
    background: #68b8ff;
    box-shadow:
        0 0 0 5px
        rgba(104, 184, 255, .16);
    animation:
        modernAiLauncherOrbit
        3.2s linear infinite;
}

.modern-ai-launcher-label {
    display: inline-block;
    min-width: 122px;
    text-align: left;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: -.08px;
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity .18s ease,
        transform .18s ease;
}

.modern-ai-launcher-label.is-changing {
    opacity: 0;
    transform: translateY(4px);
}

@keyframes modernAiLauncherGradient {
    0%,
    100% {
        background-position:
            0% 50%;
    }

    50% {
        background-position:
            100% 50%;
    }
}

@keyframes modernAiLauncherFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes modernAiLauncherShine {
    0% {
        background-position:
            220% 0;
    }

    100% {
        background-position:
            -120% 0;
    }
}

@keyframes modernAiLauncherSignal {
    0% {
        opacity: .62;
        transform: scale(.96);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.13);
    }
}

@keyframes modernAiLauncherOrbit {
    0% {
        transform:
            rotate(0deg)
            translateX(13px)
            rotate(0deg);
    }

    100% {
        transform:
            rotate(360deg)
            translateX(13px)
            rotate(-360deg);
    }
}

/*
 * Cuando el HTML actual del botón no trae una etiqueta separada,
 * mantenemos el efecto visual sin romper la estructura.
 */
.modern-ai-launcher strong,
.modern-ai-launcher b {
    font-size: 11px;
    font-weight: 850;
}

/* El radar ahora sobresale un poco más y entra con más energía. */
.modern-ai-proactive {
    animation:
        modernAiProactiveBreath
        3.8s ease-in-out infinite;
}

.modern-ai-proactive.is-visible {
    animation:
        modernAiProactiveBreath
        3.8s ease-in-out infinite;
}

@keyframes modernAiProactiveBreath {
    0%,
    100% {
        box-shadow:
            0 28px 72px
            rgba(7, 34, 79, .24),
            0 8px 22px
            rgba(12, 51, 104, .09);
    }

    50% {
        box-shadow:
            0 32px 82px
            rgba(27, 82, 188, .30),
            0 10px 28px
            rgba(12, 51, 104, .12);
    }
}

@media (max-width: 680px) {
    .modern-ai-launcher {
        min-height: 52px;
        padding:
            7px 13px 7px 8px;
    }

    .modern-ai-launcher-label {
        min-width: 106px;
        max-width: 126px;
        font-size: 10px;
        line-height: 1.15;
    }
}

@media (
    prefers-reduced-motion: reduce
) {
    .modern-ai-launcher,
    .modern-ai-launcher::before,
    .modern-ai-launcher::after,
    .modern-ai-launcher-icon::before,
    .modern-ai-launcher > span:first-child::before,
    .modern-ai-proactive {
        animation: none !important;
    }
}


/* =========================================================
   RADAR PROACTIVO RECURRENTE — V3
   ========================================================= */

.modern-ai-proactive {
    grid-template-columns:
        62px minmax(0, 1fr);
    min-height: 214px;
    padding-bottom: 14px;
}

.modern-ai-proactive-content {
    display: flex;
    flex-direction: column;
}

.modern-ai-proactive-live {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 5px;
    margin: 0 30px 7px 0;
    padding: 5px 8px;
    border:
        1px solid
        rgba(42, 112, 244, .11);
    border-radius: 999px;
    color: #49677f;
    background:
        rgba(255, 255, 255, .66);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05px;
}

.modern-ai-proactive-live > i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #24c779;
    box-shadow:
        0 0 0 4px
        rgba(36, 199, 121, .11);
    animation:
        modernAiLivePulse
        1.8s ease-in-out infinite;
}

.modern-ai-proactive-live > b {
    width: 3px;
    height: 8px;
    border-radius: 999px;
    background:
        #3b79ee;
    opacity: .28;
    animation:
        modernAiLiveBars
        1.1s ease-in-out infinite;
}

.modern-ai-proactive-live > b:nth-of-type(2) {
    animation-delay: .12s;
}

.modern-ai-proactive-live > b:nth-of-type(3) {
    animation-delay: .24s;
}

@keyframes modernAiLivePulse {
    0%,
    100% {
        transform: scale(.9);
        opacity: .72;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes modernAiLiveBars {
    0%,
    100% {
        height: 5px;
        opacity: .22;
    }

    50% {
        height: 11px;
        opacity: .85;
    }
}

.modern-ai-proactive-footer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin-top: 13px;
    padding-top: 11px;
    border-top:
        1px solid
        rgba(44, 75, 114, .08);
}

.modern-ai-proactive-dnd {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
    color: #718195;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
}

.modern-ai-proactive-dnd input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.modern-ai-proactive-dnd-switch {
    position: relative;
    width: 30px;
    height: 17px;
    flex: 0 0 30px;
    border:
        1px solid
        rgba(52, 80, 113, .14);
    border-radius: 999px;
    background: #e7ecf3;
    transition:
        background .2s ease,
        border-color .2s ease;
}

.modern-ai-proactive-dnd-switch i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 2px 6px
        rgba(26, 48, 76, .18);
    transition:
        transform .2s
        cubic-bezier(.2, .8, .2, 1);
}

.modern-ai-proactive-dnd
input:checked +
.modern-ai-proactive-dnd-switch {
    border-color:
        rgba(35, 103, 242, .38);
    background: #276bf1;
}

.modern-ai-proactive-dnd
input:checked +
.modern-ai-proactive-dnd-switch i {
    transform: translateX(13px);
}

.modern-ai-proactive-dnd-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-ai-proactive.is-cycle-1 {
    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(93, 75, 255, .16),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .98),
            rgba(246, 245, 255, .97)
        );
}

.modern-ai-proactive.is-cycle-2 {
    background:
        radial-gradient(
            circle at 5% 0%,
            rgba(30, 183, 166, .14),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .98),
            rgba(243, 252, 250, .97)
        );
}

.modern-ai-proactive.is-cycle-3 {
    background:
        radial-gradient(
            circle at 5% 0%,
            rgba(255, 151, 54, .13),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .98),
            rgba(255, 249, 242, .97)
        );
}

/*
 * "No molestar" detiene únicamente las aperturas automáticas.
 * El botón manual del asistente sigue disponible.
 */
.modern-ai-widget.is-ai-do-not-disturb
.modern-ai-launcher::before {
    animation-duration: 6s;
    opacity: .18;
}

@media (max-width: 680px) {
    .modern-ai-proactive {
        min-height: 230px;
    }

    .modern-ai-proactive-footer {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .modern-ai-proactive-start {
        width: 100%;
        justify-content: center;
    }

    .modern-ai-proactive-dnd {
        justify-content: center;
    }
}

@media (
    prefers-reduced-motion: reduce
) {
    .modern-ai-proactive-live > i,
    .modern-ai-proactive-live > b {
        animation: none !important;
    }
}


/* =========================================================
   RADAR LEGIBLE + ACCIONES RÁPIDAS — V4
   ========================================================= */

.modern-ai-proactive {
    width:
        min(
            500px,
            calc(100vw - 34px)
        );
    min-height: 252px;
    grid-template-columns:
        78px minmax(0, 1fr);
    padding:
        22px 22px 18px;
    border-radius: 28px;
}

.modern-ai-proactive-orbit {
    width: 64px;
    height: 64px;
    margin-top: 8px;
}

.modern-ai-proactive-orbit strong {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 18px;
}

.modern-ai-proactive-live {
    min-height: 28px;
    margin-bottom: 10px;
    padding: 6px 10px;
    font-size: 10.5px;
}

.modern-ai-proactive-live > i {
    width: 8px;
    height: 8px;
    flex-basis: 8px;
}

.modern-ai-proactive-eyebrow {
    margin-bottom: 5px;
    font-size: 10.5px;
    letter-spacing: 1.4px;
}

.modern-ai-proactive-content > strong {
    font-size: 20px;
    line-height: 1.18;
    letter-spacing: -.35px;
}

.modern-ai-proactive-content > p {
    margin:
        8px 0 15px;
    max-width: 355px;
    font-size: 13.5px;
    line-height: 1.55;
}

.modern-ai-proactive-track {
    gap: 9px;
}

.modern-ai-proactive-track button {
    min-height: 38px;
    padding:
        8px 14px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
}

.modern-ai-proactive-footer {
    gap: 16px;
    margin-top: 17px;
    padding-top: 15px;
}

.modern-ai-proactive-start {
    min-height: 43px;
    padding:
        10px 16px;
    border-radius: 13px;
    font-size: 12px;
}

.modern-ai-proactive-dnd {
    gap: 9px;
    font-size: 10.5px;
    line-height: 1.35;
}

.modern-ai-proactive-dnd-switch {
    width: 36px;
    height: 20px;
    flex-basis: 36px;
}

.modern-ai-proactive-dnd-switch i {
    width: 14px;
    height: 14px;
}

.modern-ai-proactive-dnd
input:checked +
.modern-ai-proactive-dnd-switch i {
    transform:
        translateX(16px);
}

.modern-ai-proactive-dismiss {
    top: 12px;
    right: 13px;
    width: 30px;
    height: 30px;
    font-size: 20px;
}


/* Acciones rápidas dentro del chat */
.modern-ai-chat-quick-actions {
    margin:
        7px 0 14px;
    padding:
        14px;
    border:
        1px solid
        rgba(39, 91, 184, .10);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .98),
            rgba(244, 248, 255, .96)
        );
    box-shadow:
        0 8px 22px
        rgba(20, 55, 108, .06);
    animation:
        modernAiMessageIn
        .25s ease both;
}

.modern-ai-chat-quick-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.modern-ai-chat-quick-heading strong {
    color: #183a66;
    font-size: 12.5px;
    line-height: 1.3;
}

.modern-ai-chat-quick-heading span {
    color: #718198;
    font-size: 9.5px;
    line-height: 1.35;
}

.modern-ai-chat-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.modern-ai-chat-quick-buttons button {
    min-height: 34px;
    padding:
        7px 11px;
    border:
        1px solid
        rgba(37, 103, 242, .18);
    border-radius: 999px;
    color: #24518c;
    background: #fff;
    box-shadow:
        0 3px 9px
        rgba(25, 63, 119, .045);
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform .17s ease,
        border-color .17s ease,
        color .17s ease,
        box-shadow .17s ease;
}

.modern-ai-chat-quick-buttons button:hover {
    border-color:
        rgba(37, 103, 242, .42);
    color: #1559d2;
    box-shadow:
        0 7px 15px
        rgba(30, 86, 190, .10);
    transform:
        translateY(-1px);
}


/* Configuración del panel administrativo */
.modern-proactive-actions-config {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 18px;
    margin-top: 18px;
}

@media (max-width: 760px) {
    .modern-ai-proactive {
        right: 10px;
        left: 10px;
        width: auto;
        min-height: 0;
        grid-template-columns:
            58px minmax(0, 1fr);
        padding:
            17px 16px 15px;
        border-radius: 23px;
    }

    .modern-ai-proactive-orbit {
        width: 50px;
        height: 50px;
    }

    .modern-ai-proactive-content > strong {
        font-size: 17px;
    }

    .modern-ai-proactive-content > p {
        font-size: 12px;
    }

    .modern-ai-proactive-footer {
        grid-template-columns: 1fr;
    }

    .modern-ai-proactive-dnd {
        justify-content: flex-start;
    }

    .modern-proactive-actions-config {
        grid-template-columns: 1fr;
    }

    .modern-ai-chat-quick-buttons {
        display: grid;
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .modern-ai-chat-quick-buttons button {
        width: 100%;
        white-space: normal;
    }
}


/* =========================================================
   INACTIVIDAD, RECORDATORIO Y RETOMAR BÚSQUEDA — V5
   ========================================================= */

.modern-ai-idle-nudge,
.modern-ai-resume-card {
    display: grid;
    grid-template-columns:
        38px minmax(0, 1fr);
    gap: 10px;
    margin:
        10px 0 14px;
    padding:
        13px;
    border:
        1px solid
        rgba(36, 101, 226, .11);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .99),
            rgba(244, 249, 255, .97)
        );
    box-shadow:
        0 9px 24px
        rgba(22, 60, 116, .07);
    animation:
        modernAiMessageIn
        .28s ease both;
}

.modern-ai-idle-icon,
.modern-ai-resume-badge {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 13px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #2c75ff,
            #6548e9
        );
    box-shadow:
        0 7px 16px
        rgba(37, 99, 220, .18);
    font-size: 15px;
}

.modern-ai-idle-body > strong,
.modern-ai-resume-body > strong {
    display: block;
    margin-bottom: 3px;
    color: #173b68;
    font-size: 12.5px;
    line-height: 1.35;
}

.modern-ai-idle-body > p,
.modern-ai-resume-body > p {
    margin:
        0 0 10px;
    color: #65778e;
    font-size: 10.5px;
    line-height: 1.5;
}

.modern-ai-idle-actions,
.modern-ai-resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modern-ai-idle-actions button,
.modern-ai-resume-actions button {
    min-height: 31px;
    padding:
        6px 10px;
    border:
        1px solid
        rgba(36, 101, 226, .17);
    border-radius: 999px;
    color: #275487;
    background: #fff;
    font-size: 9.5px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform .17s ease,
        border-color .17s ease,
        box-shadow .17s ease;
}

.modern-ai-idle-actions button:hover,
.modern-ai-resume-actions button:hover {
    border-color:
        rgba(36, 101, 226, .38);
    box-shadow:
        0 5px 12px
        rgba(29, 82, 174, .10);
    transform:
        translateY(-1px);
}

.modern-ai-resume-actions
button.is-primary {
    border-color:
        transparent;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #246cf3,
            #184dbd
        );
    box-shadow:
        0 6px 14px
        rgba(34, 94, 210, .17);
}


/* El launcher cambia visualmente cuando existe una conversación pendiente. */
.modern-ai-widget.has-ai-pending-resume
.modern-ai-launcher {
    background:
        linear-gradient(
            120deg,
            #124ab9,
            #7251f0,
            #1b70f5,
            #124ab9
        );
    background-size:
        260% 260%;
}

.modern-ai-widget.has-ai-pending-resume
.modern-ai-launcher::before {
    border-color:
        rgba(123, 96, 255, .48);
    animation-duration:
        2.1s;
}

.modern-ai-widget.has-ai-pending-resume
.modern-ai-launcher-label {
    min-width: 148px;
}


/* =========================================================
   HOTFIX V33 — CONTENCIÓN VISUAL DEL BOT
   ========================================================= */

.modern-ai-widget,
.modern-ai-widget * {
    box-sizing:
        border-box;
}


.modern-ai-proactive {
    max-width:
        calc(
            100vw -
            36px
        );

    overflow:
        hidden;
}


.modern-ai-proactive-track {
    max-width:
        100%;
}


.modern-ai-proactive-track button {
    flex:
        0 0
        auto;
}


.modern-ai-panel {
    z-index:
        20;
}


@media (
    max-width:
    680px
) {
    .modern-ai-proactive {
        right:
            0;

        left:
            auto;

        width:
            min(
                430px,
                calc(
                    100vw -
                    24px
                )
            );

        max-height:
            calc(
                100vh -
                110px
            );

        overflow-y:
            auto;
    }
}


/* Mejor legibilidad de respuestas multilínea del asistente. */
.modern-ai-message.assistant {
    white-space: pre-line;
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.modern-ai-thinking-copy {
    white-space: nowrap;
}

/* Panel compacto y estable en navegadores móviles, incluido Safari iOS. */
@media (max-width: 680px) {
    .modern-ai-panel {
        position: fixed;
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
        width: auto;
        height: auto;
        min-height: 0;
        max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
        grid-template-rows: auto minmax(0, auto) auto;
        border-radius: 24px;
    }

    .modern-ai-messages {
        min-height: 0;
        max-height: min(58dvh, 520px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .modern-ai-chat-quick-actions {
        margin-bottom: 4px;
    }

    .modern-ai-chat-form {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .modern-ai-chat-form textarea {
        font-size: 16px;
    }
}

/* =========================================================
   Captación de leads dentro del chatbot
   ========================================================= */
.modern-ai-lead-capture {
    margin: 10px 14px 14px;
    padding: 15px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 12px 28px rgba(15, 44, 92, 0.10);
}

.modern-ai-lead-intro {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modern-ai-lead-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #2368f5;
    color: #fff;
    font-size: 17px;
    box-shadow: 0 8px 20px rgba(35, 104, 245, 0.22);
}

.modern-ai-lead-intro strong {
    display: block;
    color: #153153;
    font-size: 14px;
    line-height: 1.25;
}

.modern-ai-lead-intro p {
    margin: 4px 0 0;
    color: #63758c;
    font-size: 12px;
    line-height: 1.45;
}

.modern-ai-lead-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.modern-ai-lead-actions button,
.modern-ai-lead-submit {
    min-height: 38px;
    border-radius: 999px;
    padding: 9px 15px;
    border: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.modern-ai-lead-primary,
.modern-ai-lead-submit {
    background: #2368f5;
    color: #fff;
    box-shadow: 0 8px 20px rgba(35, 104, 245, 0.20);
}

.modern-ai-lead-secondary {
    background: #fff;
    color: #254466;
    border: 1px solid #d6e2f1 !important;
}

.modern-ai-lead-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.modern-ai-lead-form[hidden] {
    display: none !important;
}

.modern-ai-lead-form > label:not(.modern-ai-lead-consent) {
    display: grid;
    gap: 5px;
}

.modern-ai-lead-form > label > span {
    color: #294766;
    font-size: 11px;
    font-weight: 800;
}

.modern-ai-lead-form input,
.modern-ai-lead-form select {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid #cddbeb;
    border-radius: 12px;
    background: #fff;
    color: #17324d;
    padding: 0 11px;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.modern-ai-lead-form input:focus,
.modern-ai-lead-form select:focus {
    border-color: #2368f5;
    box-shadow: 0 0 0 3px rgba(35, 104, 245, 0.10);
}

.modern-ai-lead-phone-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
}

.modern-ai-lead-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #63758c;
    font-size: 10.5px;
    line-height: 1.35;
    cursor: pointer;
}

.modern-ai-lead-consent input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 1px;
    accent-color: #2368f5;
}

.modern-ai-lead-status {
    min-height: 0;
    color: #17663d;
    font-size: 11px;
    font-weight: 700;
}

.modern-ai-lead-status.is-error {
    color: #b42318;
}

.modern-ai-lead-submit {
    justify-self: start;
}

.modern-ai-lead-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.modern-ai-lead-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 520px) {
    .modern-ai-lead-capture {
        margin-inline: 10px;
        padding: 13px;
    }

    .modern-ai-lead-phone-row {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .modern-ai-lead-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .modern-ai-lead-actions button {
        padding-inline: 10px;
        font-size: 11px;
    }
}

/* CTA comercial suave después de mostrar propiedades */
.modern-ai-lead-visit {
    background: #eef4ff;
    color: #174c9d;
    border: 1px solid #cbdcff !important;
}

.modern-ai-lead-form-heading {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f4f8ff;
    border: 1px solid #dce8fb;
}

.modern-ai-lead-form-heading strong {
    color: #153153;
    font-size: 13px;
    line-height: 1.25;
}

.modern-ai-lead-form-heading span {
    color: #63758c;
    font-size: 11px;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .modern-ai-lead-actions:has(.modern-ai-lead-visit) {
        grid-template-columns: 1fr;
    }
}
