/* ============================================================
   United Auto — Make an Offer  |  Front-end styles  v1.0.0
   ============================================================ */

/* ── Trigger button ─────────────────────────────────────────── */
.uab-wrap { display: inline-block; }

.uab-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
    font-family: inherit;
}
.uab-trigger-btn:hover {
    background: #c1121f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.45);
}
.uab-trigger-btn:active { transform: translateY(0); }
.uab-trigger-btn svg { flex-shrink: 0; }

/* ── Overlay ────────────────────────────────────────────────── */
.uab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Modal ──────────────────────────────────────────────────── */
.uab-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 36px 36px 28px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
    animation: uab-slide-up 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes uab-slide-up {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Close button ───────────────────────────────────────────── */
.uab-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    font-family: inherit;
}
.uab-close:hover { background: #e2e8f0; color: #1e293b; }

/* ── Header ─────────────────────────────────────────────────── */
.uab-modal-header { text-align: center; margin-bottom: 22px; }
.uab-modal-icon   { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.uab-modal-title  { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.uab-item-name    { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: #334155; }
.uab-item-sku     { margin: 0; font-size: 12px; color: #94a3b8; }

/* ── Offer amount highlight box ─────────────────────────────── */
.uab-amount-box {
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f1 100%);
    border: 2px solid #e63946;
    border-radius: 12px;
    padding: 18px 20px 14px;
    margin-bottom: 22px;
}
.uab-amount-box > label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 10px;
}
.uab-amount-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.uab-dollar {
    font-size: 30px;
    font-weight: 800;
    color: #e63946;
    line-height: 1;
    user-select: none;
}
.uab-amount-row input[type="number"] {
    flex: 1;
    border: none;
    border-bottom: 2.5px solid #e63946;
    background: transparent;
    font-size: 34px;
    font-weight: 800;
    color: #0f172a;
    outline: none;
    padding: 4px 0;
    width: 100%;
    font-family: inherit;
    -moz-appearance: textfield;
}
.uab-amount-row input[type="number"]::-webkit-inner-spin-button,
.uab-amount-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.uab-amount-row input[type="number"]:focus { border-bottom-color: #c1121f; }
.uab-hint { margin: 8px 0 0; font-size: 12px; color: #94a3b8; }

/* ── Fields grid ────────────────────────────────────────────── */
.uab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
.uab-field { display: flex; flex-direction: column; }
.uab-col-2 { grid-column: 1 / -1; }

.uab-field label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.uab-req      { color: #e63946; margin-left: 1px; }
.uab-optional { font-weight: 400; color: #94a3b8; text-transform: none; letter-spacing: 0; font-size: 11px; }

.uab-field input,
.uab-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 13px;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.18s, box-shadow 0.18s;
    font-family: inherit;
    background: #fff;
    resize: vertical;
}
.uab-field input:focus,
.uab-field textarea:focus {
    border-color: #e63946;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}
.uab-field input::placeholder,
.uab-field textarea::placeholder { color: #cbd5e1; }

/* ── Submit button ──────────────────────────────────────────── */
.uab-submit-btn {
    width: 100%;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.18s, box-shadow 0.18s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.3);
}
.uab-submit-btn:hover:not(:disabled) {
    background: #c1121f;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.4);
}
.uab-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }

/* Spinner icon */
.uab-spinner {
    width: 18px;
    height: 18px;
    animation: uab-spin 0.75s linear infinite;
    vertical-align: middle;
}
@keyframes uab-spin { to { transform: rotate(360deg); } }

/* ── Disclaimer ─────────────────────────────────────────────── */
.uab-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin: 12px 0 0;
    line-height: 1.5;
}

/* ── Success / Error messages ───────────────────────────────── */
.uab-success-msg {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 18px;
    font-size: 15px;
    text-align: center;
    line-height: 1.5;
}
.uab-error-msg {
    background: #fff1f2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 18px;
    font-size: 15px;
    text-align: center;
    line-height: 1.5;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .uab-modal      { padding: 24px 18px 20px; border-radius: 12px; }
    .uab-grid       { grid-template-columns: 1fr; }
    .uab-col-2      { grid-column: 1; }
    .uab-dollar     { font-size: 24px; }
    .uab-amount-row input[type="number"] { font-size: 26px; }
    .uab-trigger-btn { width: 100%; justify-content: center; }
}
