/*
 * Quote Request Modal — United Signs
 * @package KadenceChild
 */

/* ── Overlay ──────────────────────────────────────────────── */
.usg-qm-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.usg-qm-overlay.is-open {
    opacity: 1; pointer-events: all;
}

/* ── Modal box ────────────────────────────────────────────── */
.usg-qm-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%; max-width: 620px;
    max-height: 90vh; overflow-y: auto;
    padding: clamp(28px,4vw,48px);
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    transform: translateY(20px) scale(.97);
    transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
.usg-qm-overlay.is-open .usg-qm-modal {
    transform: translateY(0) scale(1);
}

/* Close button */
.usg-qm-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px;
    background: #f3f3f5; border: none; border-radius: 50%;
    font-size: 18px; cursor: pointer; color: #666;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s, color .18s;
    line-height: 1;
}
.usg-qm-close:hover { background: #ed1c24; color: #fff; }

/* ── Header ───────────────────────────────────────────────── */
.usg-qm-header { margin-bottom: 24px; }
.usg-qm-tag {
    display: inline-block;
    font-family: Montserrat, sans-serif;
    font-size: 10px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: #ed1c24;
    background: rgba(237,28,36,.08);
    padding: 4px 12px; border-radius: 100px;
    margin-bottom: 10px;
}
.usg-qm-title {
    font-family: Montserrat, sans-serif;
    font-size: clamp(22px,3vw,30px);
    font-weight: 800; letter-spacing: -.025em;
    color: #0d0d10; margin: 0 0 6px;
    line-height: 1.15;
}
.usg-qm-sub { font-size: 14px; color: #666; margin: 0; line-height: 1.5; }

/* ── Product badge ────────────────────────────────────────── */
.usg-qm-product-badge {
    background: #f7f7f9;
    border: 1px solid #e0e0e8;
    border-left: 3px solid #ed1c24;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 22px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.usg-qm-product-label {
    font-size: 10px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #999;
    white-space: nowrap;
}
.usg-qm-product-name {
    font-family: Montserrat, sans-serif;
    font-size: 14px; font-weight: 700; color: #0d0d10;
    flex: 1;
}
.usg-qm-product-sku {
    font-size: 12px; color: #888;
    background: #e8e8ef;
    padding: 2px 8px; border-radius: 4px;
    font-family: monospace;
    white-space: nowrap;
}

/* ── Form rows ────────────────────────────────────────────── */
.usg-qm-row { display: flex; gap: 16px; margin-bottom: 16px; }
.usg-qm-row--2 > .usg-qm-field { flex: 1; min-width: 0; }
.usg-qm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.usg-qm-row + .usg-qm-field { margin-top: 0; }

.usg-qm-field label {
    font-family: Montserrat, sans-serif;
    font-size: 12px; font-weight: 700; color: #333;
    letter-spacing: .02em;
}
.usg-qm-field label .req { color: #ed1c24; }

.usg-qm-field input,
.usg-qm-field textarea {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #e0e0e8;
    border-radius: 8px;
    padding: 11px 14px;
    font-family: Poppins, sans-serif;
    font-size: 14px; color: #1a1a24;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
    -webkit-appearance: none;
}
.usg-qm-field input:focus,
.usg-qm-field textarea:focus {
    border-color: #ed1c24;
    box-shadow: 0 0 0 3px rgba(237,28,36,.1);
}
.usg-qm-field input.has-error,
.usg-qm-field textarea.has-error {
    border-color: #ed1c24;
    background: rgba(237,28,36,.03);
}
.usg-qm-field textarea { resize: vertical; min-height: 80px; }

/* ── Actions ──────────────────────────────────────────────── */
.usg-qm-actions { margin-top: 8px; }
.usg-qm-submit {
    width: 100%;
    background: #ed1c24; color: #fff;
    border: none; border-radius: 8px;
    padding: 14px 24px;
    font-family: Montserrat, sans-serif;
    font-size: 14px; font-weight: 700; letter-spacing: .04em;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .18s, transform .15s, box-shadow .18s;
    box-shadow: 0 4px 18px rgba(237,28,36,.3);
}
.usg-qm-submit:hover {
    background: #c01019;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(237,28,36,.45);
}
.usg-qm-submit:disabled {
    opacity: .65; cursor: not-allowed; transform: none;
}
.usg-qm-privacy {
    text-align: center; font-size: 12px; color: #999;
    margin: 10px 0 0;
}
.usg-qm-privacy a { color: #666; }

/* ── Success state ────────────────────────────────────────── */
.usg-qm-success {
    text-align: center; padding: 20px 0;
}
.usg-qm-success-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #ed1c24, #c01019);
    color: #fff; font-size: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 28px rgba(237,28,36,.35);
}
.usg-qm-success h3 {
    font-family: Montserrat, sans-serif;
    font-size: 22px; font-weight: 800; color: #0d0d10;
    margin: 0 0 10px;
}
.usg-qm-success p { font-size: 14px; color: #666; line-height: 1.6; margin: 0 0 24px; }
.usg-qm-close-btn {
    background: #0d0d10; color: #fff;
    border: none; border-radius: 8px;
    padding: 12px 28px;
    font-family: Montserrat, sans-serif;
    font-size: 13px; font-weight: 700;
    cursor: pointer;
    transition: background .18s;
}
.usg-qm-close-btn:hover { background: #333; }

/* ── Error ────────────────────────────────────────────────── */
.usg-qm-error {
    background: rgba(237,28,36,.08);
    border: 1px solid rgba(237,28,36,.25);
    color: #c01019;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px; margin-top: 12px;
    line-height: 1.5;
}

/* ── "Request a Quote" button — used everywhere ───────────── */
.usg-quote-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #ed1c24; color: #fff;
    border: 2px solid #ed1c24;
    border-radius: 8px;
    padding: 13px 24px;
    font-family: Montserrat, sans-serif;
    font-size: 13px; font-weight: 700; letter-spacing: .04em;
    cursor: pointer; white-space: nowrap;
    transition: background .18s, transform .15s, box-shadow .18s;
    box-shadow: 0 4px 16px rgba(237,28,36,.28);
    text-decoration: none;
}
.usg-quote-btn:hover {
    background: #c01019; border-color: #c01019;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(237,28,36,.45);
    color: #fff;
}
.usg-quote-btn svg { flex-shrink: 0; }

/* Secondary call-us link */
.usg-call-btn {
    display: inline-flex; align-items: center; gap: 7px;
    color: #52526a; font-family: Montserrat, sans-serif;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: color .18s;
}
.usg-call-btn:hover { color: #ed1c24; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 580px) {
    .usg-qm-row { flex-direction: column; gap: 0; }
    /* Center modal with top offset to clear the fixed header (~110px topbar+header) */
    .usg-qm-overlay {
        align-items: flex-start;
        padding: 120px 16px 24px;
        overflow-y: auto;
    }
    .usg-qm-modal {
        padding: 24px 20px;
        border-radius: 14px;
        max-height: none;
        width: 100%;
    }
}