/**
 * Product page — Request a Quote (Bootstrap modal)
 * Isolated from global brochure modal styles in app.css
 */

#productQuoteModal.modal {
    z-index: 100000 !important;
}

#productQuoteModal + .modal-backdrop,
body.modal-open .modal-backdrop.show {
    z-index: 99999 !important;
}

.product-quote-modal .modal-dialog {
    max-width: 720px;
    margin: 1.75rem auto;
}

.product-quote-modal .modal-content {
    border: none;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

/* Flush header — no stray margin from global styles */
.product-quote-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-bottom: 0;
    padding: 1.125rem 1.5rem;
    background: #0066cc;
    color: #fff;
    border-bottom: none;
    border-radius: 0;
    text-align: left;
}

.product-quote-modal .modal-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.35;
}

.product-quote-modal .btn-close {
    flex-shrink: 0;
    margin: 0;
    padding: 0.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.product-quote-modal .btn-close:hover {
    opacity: 1;
}

.product-quote-modal .modal-body {
    padding: 1.5rem 1.5rem 1.25rem;
    background: #fff;
}

.product-quote-modal .quote-intro {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0.875rem 1rem 0.875rem 1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0066cc;
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #334155;
}

.product-quote-modal .quote-intro .fa-info-circle {
    color: #0066cc;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.product-quote-modal .quote-intro .quote-intro-text {
    display: block;
    margin: 0;
}

.product-quote-modal .quote-intro .quote-product-name {
    color: #0f3f7a;
    font-weight: 700;
    white-space: normal;
}

.product-quote-modal .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.125rem 1.25rem;
    margin-bottom: 1.125rem;
}

.product-quote-modal .form-row:last-of-type {
    margin-bottom: 1.25rem;
}

.product-quote-modal .form-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #1e293b;
    letter-spacing: 0.01em;
}

.product-quote-modal .form-label i {
    color: #64748b;
    font-size: 0.875rem;
    width: 1rem;
    text-align: center;
}

.product-quote-modal .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    min-height: 44px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-quote-modal .form-control:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.product-quote-modal .form-control::placeholder {
    color: #94a3b8;
}

.product-quote-modal .iti {
    width: 100%;
    display: block;
}

.product-quote-modal .iti input[type="tel"] {
    padding-left: 52px;
    width: 100%;
}

.product-quote-modal .iti__selected-flag {
    padding: 0 0 0 10px;
}

/*
 * intl-tel-input portals the dropdown via .iti--container (position:fixed).
 * Library default z-index is 1060; #productQuoteModal uses 100000, so the
 * whole dropdown stacked behind the modal and looked "stuck" at the bottom.
 */
.iti--container {
    z-index: 100060 !important;
}

.iti--container .iti__dropdown-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}

.iti__country-list {
    border-radius: 8px;
    max-height: min(240px, 50vh) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.product-quote-modal .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 0.25rem;
    padding: 1rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.product-quote-modal .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    border-color: #94a3b8;
}

.product-quote-modal .form-check-input:checked {
    background-color: #0066cc;
    border-color: #0066cc;
}

.product-quote-modal .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.product-quote-modal .form-check-label {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
}

.product-quote-modal .form-check-label a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-quote-modal .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.product-quote-modal .modal-footer .btn-primary {
    margin: 0;
    background: #0066cc;
    border: none;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

.product-quote-modal .modal-footer .btn-primary:hover {
    background: #0052a3;
}

.product-quote-modal .modal-footer .btn-outline-secondary {
    margin: 0;
    margin-right: auto;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.product-quote-modal .modal-footer .btn-outline-secondary:hover {
    color: #1e293b;
    background: #f1f5f9;
    border-color: #94a3b8;
}

.product-quote-modal .form-control.is-invalid {
    border-color: #dc3545;
}

.product-quote-modal .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15);
}

@media (min-width: 768px) {
    .product-quote-modal .form-row.two-col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    .product-quote-modal .modal-dialog {
        margin: 0.75rem;
    }

    .product-quote-modal .modal-body {
        padding: 1.25rem;
    }

    .product-quote-modal .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .product-quote-modal .modal-footer .btn-outline-secondary {
        margin-right: 0;
    }
}
