.sas-popup-quote[hidden] {
    display: none;
}

.sas-popup-quote {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
}

.sas-popup-quote__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 24, 0.76);
    backdrop-filter: blur(2px);
}

.sas-popup-quote__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1fr);
    width: min(1120px, 100%);
    height: min(680px, calc(100vh - 34px));
    max-height: calc(100vh - 34px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.sas-popup-quote__close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.62);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sas-popup-quote__close::before,
.sas-popup-quote__close::after {
    content: '';
    position: absolute;
    width: 21px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.sas-popup-quote__close::before {
    transform: rotate(45deg);
}

.sas-popup-quote__close::after {
    transform: rotate(-45deg);
}

.sas-popup-quote__close:hover {
    background: #0f172a;
    transform: scale(1.04);
}

.sas-popup-quote__close:focus-visible {
    outline: 3px solid #5bc5dc;
    outline-offset: 2px;
}

.sas-popup-quote__form-side {
    padding: clamp(28px, 4vw, 46px) clamp(24px, 4vw, 40px);
    overflow-y: auto;
}

.sas-popup-quote__eyebrow {
    margin: 0 0 8px;
    color: #0b6ea8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sas-popup-quote__title {
    margin: 0;
    color: #1e2345;
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sas-popup-quote__intro {
    margin: 8px 0 26px;
    color: #303047;
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
}

.sas-popup-quote__form label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sas-popup-quote__form input,
.sas-popup-quote__form select {
    width: 100%;
    min-height: 52px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 2px solid #5bc5dc;
    border-radius: 0;
    background: #eeeeef;
    color: #111827;
    font-size: 16px;
    line-height: 1.3;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sas-popup-quote__form input:focus,
.sas-popup-quote__form select:focus {
    border-bottom-color: #0b6ea8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(91, 197, 220, 0.2);
}

.sas-popup-quote__form input.has-error,
.sas-popup-quote__form select.has-error {
    border-bottom-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.sas-popup-quote__field-error {
    display: none;
    margin: -8px 0 10px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.sas-popup-quote__field-error.is-visible {
    display: block;
}

.sas-popup-quote__privacy {
    margin: 2px 0 16px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
    text-transform: uppercase;
}

.sas-popup-quote__privacy a {
    color: #1e2345;
    font-weight: 800;
    text-decoration: none;
}

.sas-popup-quote__privacy a:hover {
    text-decoration: underline;
}

.sas-popup-quote__submit {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #5bc5dc 0%, #0b6ea8 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.sas-popup-quote__submit:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.sas-popup-quote__submit:disabled {
    cursor: wait;
    opacity: 0.78;
}

.sas-popup-quote__message {
    min-height: 22px;
    margin: 12px 0 0;
    color: #1e2345;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.sas-popup-quote__message.is-error {
    color: #b91c1c;
}

.sas-popup-quote__message.is-success {
    color: #047857;
}

.sas-popup-quote__media-side {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #ffffff;
}

.sas-popup-quote__slides {
    position: absolute;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    transform: translate3d(calc(var(--sas-popup-slide-index, 0) * -100%), 0, 0);
    transition: transform 0.65s ease;
}

.sas-popup-quote__slide {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    opacity: 1;
    transform: none;
    transition: none;
}

.sas-popup-quote__slide.is-active {
    opacity: 1;
}

.sas-popup-quote__dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.sas-popup-quote__dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(11, 110, 168, 0.28);
}

.sas-popup-quote__dots span.is-active {
    width: 26px;
    border-radius: 999px;
    background: #5bc5dc;
}

body.sas-popup-quote-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .sas-popup-quote__panel {
        grid-template-columns: 1fr;
        height: auto;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    .sas-popup-quote__media-side {
        order: -1;
        min-height: 170px;
        max-height: 190px;
    }

    .sas-popup-quote__form-side {
        padding: 18px 18px 20px;
    }

    .sas-popup-quote__title {
        font-size: 24px;
    }

    .sas-popup-quote__eyebrow {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .sas-popup-quote__intro {
        margin: 6px 0 14px;
        font-size: 14px;
    }

    .sas-popup-quote__form input,
    .sas-popup-quote__form select {
        min-height: 44px;
        margin-bottom: 8px;
        font-size: 15px;
    }

    .sas-popup-quote__privacy {
        margin-bottom: 10px;
        font-size: 10px;
    }

    .sas-popup-quote__submit {
        min-height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .sas-popup-quote {
        padding: 0;
        align-items: stretch;
    }

    .sas-popup-quote__panel {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        overflow: hidden;
    }

    .sas-popup-quote__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .sas-popup-quote__media-side {
        width: 100%;
        min-height: 150px;
        max-height: 160px;
    }

    .sas-popup-quote__form-side {
        overflow: hidden;
        padding: 14px 16px 18px;
    }

    .sas-popup-quote__intro {
        margin: 4px 0 10px;
        font-size: 13px;
    }

    .sas-popup-quote__form input,
    .sas-popup-quote__form select {
        min-height: 39px;
        margin-bottom: 7px;
        padding: 8px 12px;
        font-size: 15px;
    }

    .sas-popup-quote__eyebrow {
        margin-bottom: 2px;
        font-size: 11px;
    }

    .sas-popup-quote__title {
        font-size: 22px;
    }

    .sas-popup-quote__privacy {
        margin: 0 0 8px;
        font-size: 9px;
    }

    .sas-popup-quote__field-error {
        margin: -4px 0 6px;
        font-size: 12px;
    }

    .sas-popup-quote__submit {
        min-height: 44px;
        font-size: 16px;
    }

    .sas-popup-quote__message {
        min-height: 16px;
        margin-top: 6px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sas-popup-quote__slide,
    .sas-popup-quote__close,
    .sas-popup-quote__submit,
    .sas-popup-quote__form input,
    .sas-popup-quote__form select {
        transition: none;
    }
}
