/* ==========================================================================
   Popup — reusable modal dialog
   ========================================================================== */

.kb-popup {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 20, 20, .8);
    -webkit-tap-highlight-color: transparent;
}
.kb-popup.is-open { display: flex; }
.kb-popup[hidden] { display: none !important; }

.kb-popup__dialog {
    position: relative;
    width: 100%;
    max-width: 1080px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    color: var(--color-fg);
    transform: translateY(8px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}
.kb-popup.is-open .kb-popup__dialog {
    transform: translateY(0);
    opacity: 1;
}

.kb-popup__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--color-fg);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    z-index: 2;
}
.kb-popup__close:hover { background: var(--color-bg-soft); }
.kb-popup__close svg { width: 22px; height: 22px; }

.kb-popup__body {
    padding: 58px 20px 40px 20px;
}
.estimate-popup__intro {
    padding: 20px;
}
/* Two-column layout used by the estimate popup. */
.kb-popup__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 clamp(28px, 4vw, 56px);
    align-items: stretch;
}
.kb-popup__split::before {
    content: '';
    position: absolute;
    background: var(--color-line);
}

@media (max-width: 800px) {
    .kb-popup__body { padding: 48px 24px 32px; }
    .kb-popup__split {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .estimate-popup__subtitle{
        margin: 0 0 15px;
    }
    .estimate-popup__features{
        gap: 10px
    }
    .estimate-popup__features, .cb_body_form_inner{
        margin-top: 15px;
    }
    .kb-popup__split::before { display: none; }
    .estimate-popup__intro, .kb-form{
        padding: 0
    }
}
