/* ── SBC Registration & Address Validation ─────────────────────────────────── */

/* Field states — scoped to address_1 only so we don't style unrelated WC fields */
#billing_address_1.woocommerce-validated,
#shipping_address_1.woocommerce-validated,
[name="billing_address_1"].woocommerce-validated,
[name="shipping_address_1"].woocommerce-validated {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 2px rgba(22,163,74,.15) !important;
}
#billing_address_1.woocommerce-invalid,
#shipping_address_1.woocommerce-invalid,
[name="billing_address_1"].woocommerce-invalid,
[name="shipping_address_1"].woocommerce-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220,38,38,.12) !important;
}

/* Spinner */
.war-spin-wrap { display:flex; align-items:center; gap:8px; font-size:12px; color:#64748b; margin-top:6px; }
.war-spinner   { width:14px; height:14px; flex-shrink:0; border:2px solid #e2e8f0; border-top-color:#0f766e; border-radius:50%; animation:war-spin .7s linear infinite; }
@keyframes war-spin { to { transform:rotate(360deg); } }

/* ─────────────────────────────────────────────────────────────────────────────
   Address verification prompt
   ───────────────────────────────────────────────────────────────────────────── */
[id^="war-prompt-"] {
    width: 100% !important;
    clear: both !important;
    float: none !important;
    display: block !important;
    box-sizing: border-box !important;
    margin-top: 12px !important;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e5ea;
    box-shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
    font-size: 13.5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    visibility: visible !important;
    opacity: 1 !important;
    color: #1a1f2e !important;
    background: #fff !important;
    animation: war-fadein .22s ease;
}
@keyframes war-fadein { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
[id^="war-prompt-"] * { visibility: visible !important; opacity: 1 !important; box-sizing: border-box; }
[id^="war-prompt-"].war-prompt--flash {
    animation: war-flash .5s ease !important;
}
@keyframes war-flash { 0%,100%{box-shadow:0 4px 16px rgba(0,0,0,.08)} 50%{box-shadow:0 0 0 3px rgba(239,68,68,.4),0 4px 16px rgba(0,0,0,.08)} }

/* ── Banner header ── */
.war-prompt__banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a4a7a 100%);
    color: #fff !important;
}
.war-prompt--warn .war-prompt__banner {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
}
.war-prompt__banner-icon {
    width: 32px; height: 32px; flex-shrink: 0;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.war-prompt__banner-icon svg { width: 16px; height: 16px; color: #fff; }
.war-prompt__banner-text { flex: 1; }
.war-prompt__banner-title {
    font-size: 13px; font-weight: 700; color: #fff !important;
    margin: 0 0 2px;
    letter-spacing: .01em;
}
.war-prompt__banner-sub {
    font-size: 11.5px; color: rgba(255,255,255,.75) !important;
    margin: 0;
}

/* ── Cards container ── */
.war-prompt__cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 14px 2px;
    background: #f8f9fb !important;
}

/* ── Individual address card ── */
.war-prompt__card {
    background: #fff !important;
    border: 1.5px solid #e2e5ea !important;
    border-radius: 8px !important;
    padding: 11px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: border-color .15s, box-shadow .15s;
    margin: 0 0 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.war-prompt__card:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.war-prompt__card--verified {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #fafcff 0%, #f0f6ff 100%) !important;
}
.war-prompt__card--verified:hover {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Card header row */
.war-prompt__card-header {
    flex: 0 0 auto;
    width: 110px;
}
.war-prompt__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    padding: 3px 8px;
    border-radius: 20px;
}
.war-prompt__badge--verified {
    background: #dbeafe; color: #1d4ed8 !important;
}
.war-prompt__badge--verified::before {
    content: "";
    display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: #22c55e;
    flex-shrink: 0;
}
.war-prompt__badge--manual {
    background: #f1f5f9; color: #64748b !important;
}

/* Card address text */
.war-prompt__card-addr {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1a1f2e !important;
    line-height: 1.5 !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
}

/* Card action button */
.war-prompt__card-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    margin-left: auto !important;
    padding: 5px 11px !important;
    font-size: 11.5px !important; font-weight: 600 !important;
    border-radius: 5px !important;
    border: 1.5px solid transparent !important;
    cursor: pointer !important; font-family: inherit !important;
    transition: all .15s;
    white-space: nowrap !important;
    width: auto !important;
}
.war-prompt__card--verified .war-prompt__card-btn {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
.war-prompt__card--verified .war-prompt__card-btn:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}
.war-prompt__card--manual .war-prompt__card-btn {
    background: #fff !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}
.war-prompt__card--manual .war-prompt__card-btn:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #475569 !important;
}

/* ── Warning variant (not found) ── */
.war-prompt--warn .war-prompt__body {
    padding: 16px;
    background: #fff !important;
}
.war-prompt__warn-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}
.war-prompt__warn-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    background: #fef2f2;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.war-prompt__warn-icon svg { width: 18px; height: 18px; color: #dc2626; }
.war-prompt__warn-text { flex: 1; }
.war-prompt__warn-title {
    font-size: 13px; font-weight: 700; color: #1a1f2e !important; margin: 0 0 3px;
}
.war-prompt__warn-detail {
    font-size: 12.5px; color: #64748b !important; margin: 0; line-height: 1.5;
}
.war-prompt__warn-detail strong { color: #1a1f2e !important; font-weight: 600; }
.war-prompt__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.war-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 12.5px; font-weight: 600;
    border-radius: 6px; border: 1.5px solid transparent;
    cursor: pointer; font-family: inherit;
    transition: all .15s;
    white-space: nowrap;
}
.war-btn--primary {
    background: #991b1b !important; color: #fff !important; border-color: #991b1b !important;
}
.war-btn--primary:hover { background: #7f1d1d !important; border-color: #7f1d1d !important; }
.war-btn--ghost {
    background: #fff !important; color: #64748b !important; border-color: #e2e8f0 !important;
}
.war-btn--ghost:hover { background: #f8fafc !important; color: #475569 !important; border-color: #cbd5e1 !important; }

/* ── Strict error note ── */
.war-strict {
    margin: 0 !important;
    padding: 10px 16px;
    font-size: 12px; font-weight: 500;
    color: #991b1b !important;
    background: #fef2f2 !important;
    border-top: 1px solid #fecaca;
    display: flex; align-items: center; gap: 6px;
}
.war-strict::before { content: "⚠"; font-size: 13px; }

/* AF dropdown */
.af_list, .af_list *, .af-popup, .af-popup *, [class*="af_list"], [class*="af_list"] * {
    color: #1e293b !important; background-color: #fff !important;
    visibility: visible !important; opacity: 1 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WAR Shortcode Form — Front-end styles
   ═══════════════════════════════════════════════════════════════════════════ */

.war-sc-wrap {
    max-width: 620px;
}

.war-sc-form .form-row {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    padding: 0 0 14px;
    box-sizing: border-box;
}

.war-sc-form .form-row-wide  { width: 100%; clear: both; }
.war-sc-form .form-row-first { width: 47%; margin-right: 6%; }
.war-sc-form .form-row-last  { width: 47%; }

.war-sc-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #374151;
}
.war-sc-form label .required { color: #dc2626; margin-left: 2px; }

.war-sc-form input[type="text"],
.war-sc-form input[type="email"],
.war-sc-form input[type="tel"],
.war-sc-form input[type="password"],
.war-sc-form select {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}

.war-sc-form input:focus,
.war-sc-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    outline: none;
}

.war-sc-form button[type="submit"] {
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 7px;
    border: none;
    background: #0f766e;
    color: #fff;
    cursor: pointer;
    transition: background .12s, transform .08s;
}
.war-sc-form button[type="submit"]:hover  { background: #0d6560; }
.war-sc-form button[type="submit"]:active { transform: scale(.97); }

.war-sc-error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; padding: 10px 14px; font-size: 13px; }
.war-sc-info  { color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 10px 14px; font-size: 13px; }

@media (max-width: 480px) {
    .war-sc-form .form-row-first,
    .war-sc-form .form-row-last { width: 100%; margin-right: 0; }
}

/* Custom field types */
.war-sc-option         { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; margin-bottom: 6px; }
.war-sc-field-desc     { display: block; font-size: 12px; color: #6b7280; margin-top: 4px; }
.war-sc-range-wrap     { display: flex; align-items: center; gap: 10px; }
.war-sc-range          { flex: 1; cursor: pointer; }
.war-sc-range-val      { font-size: 13px; font-weight: 600; color: #1e293b; min-width: 30px; }

/* ── Verified address banner (above address_1 field) ────────────────────── */
.war-verified-row {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
    box-sizing: border-box !important;
}
.war-verified-banner {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    border: 1px solid #86efac !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}
.war-verified-banner__icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    background: #22c55e !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}
.war-verified-banner__text {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #166534 !important;
    line-height: 1.4 !important;
}
