.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    overscroll-behavior: contain;
}

.quote-modal.is-open {
    display: flex;
}

.quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.62);
    backdrop-filter: blur(4px);
}

.quote-modal__panel {
    position: relative;
    width: min(780px, 100%);
    max-height: min(92vh, 880px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.quote-modal__header {
    padding: 22px 24px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #f1f1f1;
}

.quote-modal__eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #BB0606;
    margin-bottom: 5px;
}

.quote-modal__header h2 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.18;
    color: #111827;
}

.quote-modal__header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.35;
}

.quote-modal__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    color: #6b7280;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 0.2s ease, color 0.2s ease;
}

.quote-modal__close:hover {
    background: #fee2e2;
    color: #BB0606;
}

.quote-form {
    padding: 20px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.quote-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.quote-type {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    background: #f3f4f6;
    margin-bottom: 18px;
}

.quote-type__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 9px;
    color: #4b5563;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.quote-type__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quote-type__option.is-active {
    background: #fff;
    color: #BB0606;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quote-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.quote-field--wide {
    grid-column: 1 / -1;
}

.quote-field span,
.quote-contact legend {
    color: #374151;
    font-size: 0.82rem;
    font-weight: 800;
}

.quote-field input,
.quote-field textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 0.93rem;
    line-height: 1.35;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quote-field input {
    height: 44px;
    padding: 0 12px;
}

.quote-field textarea {
    min-height: 96px;
    resize: vertical;
    padding: 11px 12px;
}

.quote-field input:focus,
.quote-field textarea:focus {
    border-color: #BB0606;
    box-shadow: 0 0 0 3px rgba(187, 6, 6, 0.1);
}

.quote-field.is-invalid input,
.quote-field.is-invalid textarea {
    border-color: #BB0606;
    background: #fff7f7;
}

.quote-field.is-hidden {
    display: none;
}

.quote-contact {
    border: 0;
    padding: 0;
    margin: 18px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quote-contact legend {
    width: 100%;
    margin-bottom: 2px;
}

.quote-contact label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.quote-contact input {
    accent-color: #BB0606;
}

.quote-turnstile {
    margin-top: 18px;
    min-height: 1px;
}

.quote-form__message {
    margin: 14px 0 0;
    min-height: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #BB0606;
}

.quote-form__message.is-success {
    color: #047857;
}

.quote-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f1f1;
}

.quote-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 11px;
    border: 0;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quote-btn--ghost {
    background: #f3f4f6;
    color: #374151;
}

.quote-btn--primary {
    background: #BB0606;
    color: #fff;
    box-shadow: 0 10px 24px rgba(187, 6, 6, 0.18);
}

.quote-btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.quote-btn:disabled {
    opacity: 0.68;
    cursor: wait;
}

html.quote-modal-lock,
body.quote-modal-lock {
    overflow: hidden;
    overscroll-behavior: none;
}

.technicalOption.opt-form {
    font-family: inherit;
    width: 100%;
}

@media (max-width: 720px) {
    .quote-modal {
        align-items: flex-end;
        padding: 0;
    }

    .quote-modal__panel {
        width: 100%;
        max-height: 94vh;
        border-radius: 18px 18px 0 0;
    }

    .quote-modal__header {
        padding: 18px 18px 15px;
    }

    .quote-modal__header h2 {
        font-size: 1.28rem;
    }

    .quote-form {
        padding: 16px 18px 20px;
    }

    .quote-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quote-form__actions {
        flex-direction: column-reverse;
    }

    .quote-btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .quote-type__option {
        font-size: 0.82rem;
    }

    .quote-contact {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quote-contact label {
        width: 100%;
        box-sizing: border-box;
    }
}
