/* =========================================================
   QUOTE FORM MODAL — BEM
   Site-wide popup opened by any CTA with "Open quote form in a
   popup" switched on. Background image + scrim, the contact
   block's form styling on top, and a close button that is the
   ONLY way out — clicking the backdrop and pressing Escape are
   both deliberately inert.
   ========================================================= */

.smartfix-quote-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.smartfix-quote-modal[hidden] {
    display: none;
}

.smartfix-quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 18, 18, 0.82);
}

/* ── Panel: the background image lives here ── */
.smartfix-quote-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--sf-card-radius, 18px);
    background-color: var(--sf-bg-dark-1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Darkens the image so the form reads cleanly over any photo */
.smartfix-quote-modal__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 18, 20, 0.86) 0%,
        rgba(10, 18, 20, 0.93) 100%
    );
    pointer-events: none;
}

.smartfix-quote-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 50%;
    color: var(--sf-text-white);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.smartfix-quote-modal__close:hover,
.smartfix-quote-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.24);
}

/* Explicit size — a bare svg collapses to zero width inside a flex
   container under GeneratePress's resets. */
.smartfix-quote-modal__close svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.smartfix-quote-modal__body {
    position: relative;
    z-index: 1;
    padding: 40px 32px 36px;
}

.smartfix-quote-modal__header {
    margin: 0 48px 24px 0;
}

.smartfix-quote-modal__title {
    font-family: var(--sf-font-heading);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    color: var(--sf-text-white);
    margin: 0;
}

.smartfix-quote-modal__sub {
    font-family: var(--sf-font-body);
    font-size: var(--sf-fs-body);
    line-height: var(--sf-lh-body);
    color: var(--sf-text-white-72);
    margin: 8px 0 0;
}

/* The form card reuses .smartfix-contact__form-wrap wholesale; it just
   doesn't need its own translucent panel on top of the scrim. */
.smartfix-quote-modal__form-wrap {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: rgba(0, 180, 160, 0.35);
    padding: 24px 20px;
}

@media (max-width: 640px) {
    .smartfix-quote-modal {
        padding: 16px;
    }

    .smartfix-quote-modal__body {
        padding: 32px 20px 28px;
    }

    .smartfix-quote-modal__form-wrap {
        padding: 20px 16px;
    }
}
