.cz-valuation-popup[hidden] { display: none !important; }

.cz-valuation-popup {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: grid;
    place-items: center;
    padding: clamp(12px, 2.5vw, 32px);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}

.cz-valuation-popup.is-visible {
    opacity: 1;
    visibility: visible;
}

.cz-valuation-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 24, 35, .68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.cz-valuation-popup__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 43%) minmax(0, 57%);
    width: min(1500px, 92vw);
    height: min(900px, 84vh);
    min-height: 580px;
    overflow: hidden;
    color: #203340;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(2, 26, 43, .34);
    transform: translateY(20px) scale(.985);
    transition: transform .32s cubic-bezier(.2, .75, .2, 1);
}

.cz-valuation-popup.is-visible .cz-valuation-popup__dialog {
    transform: translateY(0) scale(1);
}

.cz-valuation-popup__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #16384d;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #d8e3e9;
    border-radius: 50%;
    box-shadow: 0 6px 22px rgba(9, 39, 57, .16);
    font: 400 36px/1 Arial, sans-serif;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.cz-valuation-popup__close:hover,
.cz-valuation-popup__close:focus-visible {
    color: #fff;
    background: #056ba8;
    outline: 3px solid rgba(5, 107, 168, .22);
    transform: rotate(4deg) scale(1.04);
}

.cz-valuation-popup__image-wrap {
    position: relative;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #dfeaf0;
}

.cz-valuation-popup__image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(4, 37, 58, .48));
    pointer-events: none;
}

.cz-valuation-popup__image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 56% center;
}

.cz-valuation-popup__image-badge {
    position: absolute;
    left: clamp(20px, 3vw, 42px);
    bottom: clamp(20px, 3vw, 38px);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 17px;
    color: #fff;
    background: rgba(3, 80, 126, .88);
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.cz-valuation-popup__image-badge strong { font-size: 16px; line-height: 1.3; }
.cz-valuation-popup__image-badge span { font-size: 13px; opacity: .9; }

.cz-valuation-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow-y: auto;
    padding: clamp(46px, 5.4vw, 84px);
    background:
        radial-gradient(circle at 100% 0, rgba(47, 145, 195, .13), transparent 36%),
        #fff;
    box-sizing: border-box;
}

.cz-valuation-popup__eyebrow {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 18px;
    padding: 7px 12px;
    color: #056ba8;
    background: #e9f4fa;
    border-radius: 999px;
    font: 700 12px/1.2 Poppins, sans-serif;
    letter-spacing: .09em;
}

.cz-valuation-popup__content h2 {
    max-width: 680px;
    margin: 0 0 18px;
    color: #123f5c;
    font: 700 clamp(34px, 3.5vw, 58px)/1.08 Poppins, sans-serif;
    letter-spacing: -.035em;
}

.cz-valuation-popup__lead {
    max-width: 680px;
    margin: 0 0 28px;
    color: #526673;
    font: 400 clamp(16px, 1.35vw, 20px)/1.65 Poppins, sans-serif;
}

.cz-valuation-popup__benefits {
    display: grid;
    gap: 14px;
    max-width: 680px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.cz-valuation-popup__benefits li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin: 0;
}

.cz-valuation-popup__benefits li > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: #056ba8;
    border-radius: 50%;
    font-weight: 700;
}

.cz-valuation-popup__benefits strong,
.cz-valuation-popup__benefits small { display: block; font-family: Poppins, sans-serif; }
.cz-valuation-popup__benefits strong { margin-bottom: 2px; color: #213b4b; font-size: 16px; line-height: 1.35; }
.cz-valuation-popup__benefits small { color: #647984; font-size: 14px; line-height: 1.45; }

.cz-valuation-popup__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    align-self: flex-start;
}

.cz-valuation-popup__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    align-self: flex-start;
    min-height: 56px;
    padding: 14px 24px;
    color: #fff !important;
    background: #056ba8;
    border: 2px solid #056ba8;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(5, 107, 168, .22);
    font: 700 16px/1.3 Poppins, sans-serif;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.cz-valuation-popup__cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 14px 20px;
    color: #056ba8 !important;
    background: #fff;
    border: 2px solid #b8d5e5;
    border-radius: 10px;
    font: 700 14px/1.3 Poppins, sans-serif;
    text-decoration: none !important;
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.cz-valuation-popup__cta-secondary:hover,
.cz-valuation-popup__cta-secondary:focus-visible {
    color: #034e7d !important;
    background: #eef7fb;
    border-color: #056ba8;
    outline: 3px solid rgba(5, 107, 168, .15);
    transform: translateY(-2px);
}

.cz-valuation-popup__cta:hover,
.cz-valuation-popup__cta:focus-visible {
    color: #fff !important;
    background: #034e7d;
    border-color: #034e7d;
    outline: 3px solid rgba(5, 107, 168, .2);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(5, 107, 168, .28);
}

.cz-valuation-popup__note {
    margin: 12px 0 0;
    color: #71828b;
    font: 400 12px/1.5 Poppins, sans-serif;
}

body.cz-valuation-popup-open { overflow: hidden !important; }

.cz-valuation-launcher[hidden] { display: none !important; }

.cz-valuation-launcher {
    position: fixed;
    right: 22px;
    top: auto;
    bottom: 92px;
    z-index: 999998;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 11px 17px;
    color: #fff;
    background: #056ba8;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(3, 58, 91, .28);
    font: 700 13px/1.2 Poppins, sans-serif;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .22s ease, transform .22s ease, background .2s ease;
}

.cz-valuation-launcher.is-visible { opacity: 1; transform: translateY(0); }
.cz-valuation-launcher:hover,
.cz-valuation-launcher:focus-visible { background: #034e7d; outline: 3px solid rgba(5, 107, 168, .2); }

@media (max-width: 767px) {
    .cz-valuation-popup { padding: 10px; }
    .cz-valuation-popup__dialog {
        grid-template-columns: 1fr;
        grid-template-rows: 27% minmax(0, 73%);
        width: calc(100vw - 20px);
        height: 90vh;
        min-height: 0;
        border-radius: 18px;
    }
    .cz-valuation-popup__close { top: 10px; right: 10px; width: 44px; height: 44px; font-size: 32px; }
    .cz-valuation-popup__image-wrap img { object-position: 52% 44%; }
    .cz-valuation-popup__image-badge { left: 14px; bottom: 14px; padding: 9px 12px; }
    .cz-valuation-popup__image-badge strong { font-size: 14px; }
    .cz-valuation-popup__image-badge span { font-size: 11px; }
    .cz-valuation-popup__content { justify-content: flex-start; padding: 20px 20px 16px; }
    .cz-valuation-popup__eyebrow { margin-bottom: 9px; font-size: 10px; }
    .cz-valuation-popup__content h2 { margin-bottom: 9px; font-size: clamp(27px, 8.5vw, 38px); }
    .cz-valuation-popup__lead { margin-bottom: 14px; font-size: 15px; line-height: 1.45; }
    .cz-valuation-popup__benefits { gap: 8px; margin-bottom: 14px; }
    .cz-valuation-popup__benefits li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
    .cz-valuation-popup__benefits li > span { width: 27px; height: 27px; font-size: 13px; }
    .cz-valuation-popup__benefits strong { font-size: 14px; }
    .cz-valuation-popup__benefits small { font-size: 12px; }
    .cz-valuation-popup__cta { align-self: stretch; min-height: 52px; padding: 12px 15px; font-size: 14px; }
    .cz-valuation-popup__actions { display: grid; width: 100%; gap: 9px; }
    .cz-valuation-popup__cta-secondary { min-height: 48px; padding: 10px 12px; font-size: 12px; }
    .cz-valuation-popup__note { margin-top: 8px; text-align: center; }
}

@media (max-width: 900px) and (orientation: landscape) {
    .cz-valuation-popup__dialog {
        grid-template-columns: 32% 68%;
        grid-template-rows: 1fr;
        width: 94vw;
        height: 90vh;
        min-height: 0;
        border-radius: 18px;
    }
    .cz-valuation-popup__content { justify-content: flex-start; padding: 10px 16px; }
    .cz-valuation-popup__eyebrow { margin-bottom: 6px; padding: 4px 9px; font-size: 9px; }
    .cz-valuation-popup__content h2 { margin-bottom: 6px; font-size: 24px; line-height: 1.04; }
    .cz-valuation-popup__lead { margin-bottom: 7px; font-size: 11px; line-height: 1.32; }
    .cz-valuation-popup__benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 9px; }
    .cz-valuation-popup__benefits li { grid-template-columns: 24px minmax(0, 1fr); gap: 6px; align-items: center; }
    .cz-valuation-popup__benefits li > span { width: 24px; height: 24px; font-size: 11px; }
    .cz-valuation-popup__benefits strong { font-size: 11px; line-height: 1.2; }
    .cz-valuation-popup__benefits small { display: none; }
    .cz-valuation-popup__cta { min-height: 46px; padding: 9px 12px; font-size: 12px; }
    .cz-valuation-popup__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 8px; }
    .cz-valuation-popup__cta,
    .cz-valuation-popup__cta-secondary { width: auto; min-width: 0; min-height: 44px; padding: 8px 9px; font-size: 10px; }
    .cz-valuation-popup__note { display: none; }
    .cz-valuation-popup__image-badge { left: 14px; bottom: 14px; }
}

@media (max-width: 700px) and (max-height: 360px) and (orientation: landscape) {
    .cz-valuation-popup__dialog { grid-template-columns: 28% 72%; }
    .cz-valuation-popup__content { padding: 8px 12px; }
    .cz-valuation-popup__content h2 { font-size: 21px; }
    .cz-valuation-popup__lead { font-size: 10px; }
    .cz-valuation-popup__benefits { gap: 5px; margin-bottom: 7px; }
    .cz-valuation-popup__benefits li { grid-template-columns: 20px minmax(0, 1fr); gap: 5px; }
    .cz-valuation-popup__benefits li > span { width: 20px; height: 20px; font-size: 9px; }
    .cz-valuation-popup__benefits strong { font-size: 10px; }
    .cz-valuation-popup__image-badge { display: none; }
}

/* En tablet conserva la posición inferior del escritorio, separada del chatbot. */
@media (max-width: 900px) {
    .cz-valuation-launcher {
        top: auto;
        right: 14px;
        bottom: 92px;
        width: auto;
        min-width: 0;
        height: auto;
        min-height: 46px;
        padding: 10px 15px;
        justify-content: flex-start;
        gap: 8px;
        border-radius: 999px;
        font-size: 12px;
    }
    .cz-valuation-launcher span { display: inline; }
}

@media (max-width: 767px) {
    .cz-valuation-launcher {
        top: 90px;
        right: 12px;
        bottom: auto;
        min-height: 44px;
        padding: 10px 14px;
    }
}

/* Un móvil en horizontal supera a menudo los 767 px de ancho. */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .cz-valuation-launcher {
        top: 84px;
        right: 12px;
        bottom: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cz-valuation-popup,
    .cz-valuation-popup__dialog,
    .cz-valuation-popup__close,
    .cz-valuation-popup__cta,
    .cz-valuation-popup__cta-secondary,
    .cz-valuation-launcher { transition: none !important; }
}
