/* Get Best Price — Request a Quote modal */
:root {
    --eq-brand: #0b5d57;
    --eq-brand-dark: #07423e;
    --eq-brand-light: #e6f3f1;
    --eq-ink: #10201f;
    --eq-muted: #5f7370;
    --eq-line: #d9e4e2;
    --eq-bg: #f5f9f8;
    --eq-danger: #d93636;
    --eq-ok: #1f9d63;
    --eq-radius: 12px;
}

/*
 * Always reserve scrollbar space so open/close never
 * resizes the page, sticky header, or navbar.
 */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/*
 * When closed: visibility:hidden after fade so the full-screen
 * layer cannot steal clicks from product cards.
 * When open: visibility flips on immediately; backdrop opacity eases.
 */
#enquiryModal,
#enquiryModal.show,
#enquiryModal.fade,
#enquiryModal.fade.show {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1050 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 16px !important;
    margin: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: hidden;
    pointer-events: none !important;
    transition: visibility 0s linear 0.4s;
}

#enquiryModal.show,
#enquiryModal.fade.show {
    visibility: visible !important;
    pointer-events: auto !important;
    transition-delay: 0s;
}

/* Dedicated backdrop layer — opacity-only, GPU-friendly */
.enquiry-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(7, 28, 26, 0.58);
    opacity: 0;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.33, 0, 0.2, 1);
    will-change: opacity;
}

#enquiryModal.show .enquiry-backdrop,
#enquiryModal.fade.show .enquiry-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/*
 * Do NOT set overflow:hidden on html (that removes the scrollbar
 * and shifts .site-chrome). Freeze page scroll via JS instead.
 */
html.eq-scroll-lock body {
    overscroll-behavior: none;
}

#enquiryModal .modal-dialog {
    width: 100%;
    max-width: 640px;
    margin: auto !important;
    position: relative;
    z-index: 1;
    transform: translate3d(0, 6px, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s cubic-bezier(0.33, 0, 0.2, 1);
    transition-delay: 0.04s;
}

#enquiryModal.show .modal-dialog,
#enquiryModal.fade.show .modal-dialog {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
}

#enquiryModal .modal-content,
#enquiryModal .enquiry-sheet {
    background: #fff;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

#enquiryModal .enquiry-form {
    margin: 0;
}

/* Header */
.enquiry-head {
    position: relative;
    overflow: hidden;
    padding: 24px 28px 22px;
    background: linear-gradient(120deg, #07423e, #0b5d57);
    color: #fff;
}

.enquiry-head::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -30px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

.enquiry-title {
    margin: 0 40px 6px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    position: relative;
    z-index: 1;
}

.enquiry-sub {
    margin: 0 40px 0 0;
    font-size: 14px;
    line-height: 1.45;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.enquiry-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.25s ease;
}

.enquiry-close:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(90deg);
}

/* Body */
.enquiry-body {
    padding: 22px 28px;
    max-height: min(62vh, 560px);
    overflow-y: auto;
}

.enquiry-product {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 22px;
    padding: 14px;
    background: var(--eq-brand-light);
    border: 1px solid #cfe5e2;
    border-radius: var(--eq-radius);
}

.enquiry-product[hidden] {
    display: none !important;
}

.enquiry-product-media {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 6px 16px rgba(7, 66, 62, 0.14);
}

.enquiry-product-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enquiry-product-info {
    min-width: 0;
    flex: 1;
}

.enquiry-product-name {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--eq-ink);
}

.enquiry-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.enquiry-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 1.2;
    color: #fff;
    background: var(--eq-brand-dark);
}

.enquiry-badge-hot {
    background: #d7f5e5;
    color: #0f7a48;
}

.enquiry-product-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--eq-brand);
    text-decoration: none;
}

.enquiry-product-link:hover {
    text-decoration: underline;
}

.enquiry-product-link[hidden] {
    display: none !important;
}

.enquiry-for {
    margin: 0 0 18px;
    padding: 12px 14px;
    background: var(--eq-brand-light);
    border: 1px solid #cfe5e2;
    border-radius: var(--eq-radius);
}

.enquiry-for[hidden] {
    display: none !important;
}

.enquiry-for-label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--eq-brand);
}

.enquiry-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.enquiry-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cfe5e2;
    color: var(--eq-ink);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
}

.enquiry-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}

.enquiry-section-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--eq-muted);
}

.enquiry-section::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--eq-line);
}

.enquiry-field {
    margin-bottom: 14px;
}

.enquiry-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--eq-ink);
}

.enquiry-field .req {
    color: var(--eq-danger);
}

.enquiry-field .opt {
    margin-left: 4px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--eq-muted);
}

.enquiry-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.enquiry-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.enquiry-control {
    position: relative;
}

.enquiry-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #8aa09d;
    pointer-events: none;
    transition: color 0.15s ease;
}

.enquiry-input,
.enquiry-textarea {
    width: 100%;
    border: 1.5px solid var(--eq-line);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--eq-ink);
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.enquiry-input.has-icon {
    padding-left: 42px;
}

.enquiry-textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
}

.enquiry-input::placeholder,
.enquiry-textarea::placeholder {
    color: #9db0ad;
}

.enquiry-input:hover,
.enquiry-textarea:hover {
    border-color: #b7cbc8;
}

.enquiry-control.is-focused .enquiry-icon {
    color: var(--eq-brand);
}

.enquiry-input:focus,
.enquiry-textarea:focus {
    border-color: var(--eq-brand);
    box-shadow: 0 0 0 4px rgba(11, 93, 87, 0.12);
}

select.enquiry-input {
    height: 46px;
    cursor: pointer;
}

/* Invalid */
.enquiry-field.is-invalid .enquiry-input,
.enquiry-field.is-invalid .enquiry-textarea {
    border-color: var(--eq-danger);
    box-shadow: 0 0 0 4px rgba(217, 54, 54, 0.12);
}

.enquiry-field-error {
    display: none;
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--eq-danger);
}

.enquiry-field.is-invalid .enquiry-field-error {
    display: block;
}

.enquiry-req-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.enquiry-req-meta .enquiry-field-error {
    margin: 0;
}

.enquiry-char-count {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--eq-muted);
}

.enquiry-char-count.is-near {
    color: #b45309;
}

.enquiry-char-count.is-max {
    color: var(--eq-danger);
}

.enquiry-location-block[hidden] {
    display: none !important;
}

.enquiry-location-block {
    margin-bottom: 2px;
}

.enquiry-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.enquiry-form-error {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff1f0;
    border: 1px solid #f5c2c0;
    color: #8a1f17;
    font-size: 13px;
    font-weight: 600;
}

.enquiry-form-error[hidden] {
    display: none !important;
}

/* Footer */
.enquiry-foot {
    padding: 16px 28px 22px;
    border-top: 1px solid var(--eq-line);
    background: #fff;
}

.enquiry-submit {
    appearance: none;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    padding: 15px;
    border-radius: var(--eq-radius);
    background: linear-gradient(120deg, #07423e, #0b5d57 60%, #12877d);
    box-shadow: 0 8px 20px rgba(11, 93, 87, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.enquiry-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(11, 93, 87, 0.45);
    color: #fff;
}

.enquiry-submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.enquiry-submit svg {
    width: 18px;
    height: 18px;
}

.enquiry-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.enquiry-trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--eq-muted);
}

.enquiry-trust svg {
    width: 14px;
    height: 14px;
    color: var(--eq-ok);
    flex-shrink: 0;
}

/* Success */
.enquiry-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 28px 40px;
}

.enquiry-success:not([hidden]) {
    display: flex;
}

.enquiry-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #d7f5e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.enquiry-success-icon svg {
    width: 34px;
    height: 34px;
    color: var(--eq-ok);
}

.enquiry-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--eq-ink);
}

.enquiry-success p {
    margin: 0 0 22px;
    font-size: 14.5px;
    color: var(--eq-muted);
    line-height: 1.5;
    max-width: 320px;
}

.enquiry-success-close {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: var(--eq-ok);
    padding: 12px 28px;
    border-radius: 10px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.enquiry-success-close:hover {
    background: #178a55;
    transform: translateY(-1px);
    color: #fff;
}

#enquiryFormShell[hidden],
#enquiryFormFields[hidden],
#enquiryFooter[hidden],
.enquiry-success[hidden] {
    display: none !important;
}

@media (max-width: 560px) {
    #enquiryModal {
        padding: 0;
        align-items: stretch;
    }

    #enquiryModal .modal-dialog {
        max-width: none;
        min-height: 100%;
        margin: 0;
    }

    #enquiryModal .enquiry-sheet {
        min-height: 100%;
        border-radius: 0;
    }

    .enquiry-head,
    .enquiry-body,
    .enquiry-foot,
    .enquiry-success {
        padding-left: 18px;
        padding-right: 18px;
    }

    .enquiry-body {
        max-height: none;
    }

    .enquiry-grid-2,
    .enquiry-grid-3 {
        grid-template-columns: 1fr;
    }

    .enquiry-title {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #enquiryModal,
    .enquiry-backdrop,
    #enquiryModal .modal-dialog,
    .enquiry-close,
    .enquiry-submit {
        transition: none !important;
        transform: none !important;
    }

    #enquiryModal.show .enquiry-backdrop {
        opacity: 1;
    }
}
