/* ══════════════════════════════════════════════════════════════
   promo-style.css  — Sutton Cars Referral System
   Full mobile-responsive stylesheet (all pages)
   ══════════════════════════════════════════════════════════════ */

/* ── Reset & Box Model ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ── */
:root {
    --blue:    #2B3D91;
    --blue-dk: #1b275e;
    --orange:  #ff4d00;
    --gold:    #FDC12F;
    --black:   #111;
    --border:  #e0e0e0;
    --grey:    #f5f5f5;
    --mid:     #666;
    --radius:  10px;
}

/* ── Base ── */
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--grey);
    min-height: 100vh;
    /* Prevent horizontal scroll on all pages */
    overflow-x: hidden;
}

/* Global SVG Constraint */
svg:not(.iti__country-list svg):not(.nav-logo svg) {
    max-width: 1.5rem;
    height: auto;
    vertical-align: middle;
}


/* ══════════════════════════════════
   PAGE WRAPPER (login / profile / etc.)
   ══════════════════════════════════ */
.page-wrap {
    max-width: 440px;
    margin: 48px auto 60px;
    padding: 0 16px;
}

@media (max-width: 480px) {
    .page-wrap {
        margin-top: 24px;
        margin-bottom: 40px;
    }
}

/* ── Card ── */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 28px rgba(0,0,0,.08);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    background: var(--blue);
    color: #fff;
    padding: 18px 24px;
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--gold);
}
.card-body { padding: 24px 24px 28px; }

@media (max-width: 400px) {
    .card-body { padding: 18px 16px 22px; }
}

/* ══════════════════════════════════
   FORMS
   ══════════════════════════════════ */
.field-group { margin-bottom: 16px; }
.field-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #444;
    margin-bottom: 5px;
}
.field-group label .req { color: var(--orange); }
.field-group input {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color .2s;
}
.field-group input:focus { border-color: var(--orange); }

.field-group .field-error {
    display: none;
    font-size: 12px;
    color: #c00;
    margin-top: 4px;
}
.field-group.has-error input { border-color: #c00; }
.field-group.has-error .field-error { display: block; }

/* Two-column row — stacks on mobile */
.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ── Buttons ── */
.btn-login, .btn-register, .btn-submit {
    width: 100%;
    background: var(--gold);
    color: var(--blue);
    border: none;
    padding: 13px;
    border-radius: 7px;
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .1s;
    box-shadow: 0 4px 0 #d4a327;
    touch-action: manipulation;
}
.btn-login:hover, .btn-register:hover, .btn-submit:hover { background: #ffca4a; }
.btn-login:active, .btn-register:active, .btn-submit:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #d4a327;
}
.btn-login:disabled, .btn-register:disabled, .btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Links / footer text ── */
.links, .back-link, .login-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--mid);
}
.links a, .back-link a, .login-link a { color: var(--orange); font-weight: 600; text-decoration: none; }
.links .divider { margin: 0 8px; color: #ccc; }

/* ── Alerts ── */
.alert {
    border-radius: 7px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert.show    { display: block; }

/* ══════════════════════════════════
   REGISTER — Invite Banner
   ══════════════════════════════════ */
.invite-banner {
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dk) 100%);
    color: #fff;
    padding: 18px 20px;
    text-align: center;
    border-bottom: 3px solid var(--gold);
}
.invite-banner h2 {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}
.invite-banner p { font-size: 13px; opacity: .85; }
.invite-banner .discount-pill {
    display: inline-block;
    background: var(--gold);
    color: var(--blue);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 20px;
    padding: 3px 16px;
    border-radius: 30px;
    margin: 8px 0 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

/* ── Terms ── */
.terms {
    font-size: 12px;
    color: #888;
    margin-top: 12px;
    text-align: center;
    line-height: 1.5;
}

/* ══════════════════════════════════
   REFER-A-FRIEND PAGE
   ══════════════════════════════════ */

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--blue) 0%, #1b275e 60%, #111 100%);
    color: #fff;
    padding: 56px 20px 72px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--gold);
}
.hero-badge {
    display: inline-block;
    background: rgba(253,193,47,.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(28px, 7vw, 54px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 14px;
}
.hero h1 span { color: var(--gold); }
.hero p {
    font-size: clamp(15px, 2.5vw, 18px);
    opacity: .8;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .hero { padding: 40px 16px 56px; }
}

/* Rewards section */
.how-section {
    padding: 48px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.how-section h2 {
    font-family: 'Syne', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 36px;
}

.rewards {
    display: flex;
    gap: 14px;
    max-width: 540px;
    margin: 0 auto 44px;
    flex-wrap: wrap;
    justify-content: center;
}
.reward-badge {
    background: #fff;
    border: 2px solid var(--blue);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    flex: 1;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(43,61,145,.08);
}
.reward-badge .amount {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--blue);
}
.reward-badge .label {
    font-size: 12px;
    color: var(--mid);
    margin-top: 4px;
}

/* Steps */
.steps {
    display: flex;
    gap: 18px;
    max-width: 820px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.step {
    flex: 1;
    min-width: 140px;
    max-width: 190px;
    text-align: center;
}
.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    border: 2px solid var(--gold);
    /* font-family: 'Syne', sans-serif; */
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.step h4 {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}
.step p { font-size: 13px; color: var(--mid); line-height: 1.5; }

@media (max-width: 560px) {
    .steps {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .step {
        max-width: 100%;
        width: 100%;
        display: flex;
        align-items: flex-start;
        gap: 14px;
        text-align: left;
    }
    .step-num {
        flex-shrink: 0;
        margin: 0;
    }
    .step-text { flex: 1; }
}

/* Referral Form Section */
.form-section {
    padding: 48px 16px 64px;
    background: var(--grey);
}
.form-card {
    max-width: 540px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 32px rgba(0,0,0,.08);
    overflow: hidden;
}
.form-header {
    background: var(--blue);
    color: #fff;
    padding: 20px 24px;
    font-family: 'Syne', sans-serif;
    font-size: 19px;
    font-weight: 700;
    border-bottom: 2px solid var(--gold);
}
.form-body { padding: 28px 24px; }

@media (max-width: 400px) {
    .form-body { padding: 20px 16px; }
}

/* My Referrals table */
.referrals-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 56px;
}
.referrals-section h3 {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 40px;
}

/* Scrollable table wrapper on mobile */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.ref-table {
    width: 100%;
    min-width: 540px; /* Ensures table doesn't crush on tiny screens */
    border-collapse: collapse;
    background: #fff;
}
.ref-table th {
    background: var(--black);
    color: #fff;
    padding: 11px 14px;
    text-align: left;
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    white-space: nowrap;
}
.ref-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table th:last-child { text-align: right; padding-right: 14px; }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.s-Pending    { background: #fff3cd; color: #856404; }
.s-Registered { background: #cce5ff; color: #004085; }
.s-Completed  { background: #d4edda; color: #155724; }
.s-Rewarded   { background: #d1ecf1; color: #0c5460; }

/* ── Action Buttons ── */
.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    transition: transform .2s, opacity .2s;
    flex-shrink: 0;
}
.act-btn:hover { transform: scale(1.1); opacity: .9; }
.act-btn.wa   { background: #25D366; }
.act-btn.mail { background: #0078D4; }
.act-btn.call { background: var(--blue); }

/* Wallet bar */
.wallet-bar {
    background: linear-gradient(90deg, var(--blue), var(--blue-dk));
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    border-bottom: 2px solid var(--gold);
    flex-wrap: wrap;
    text-align: center;
}
.wallet-bar .wallet-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
}

@media (max-width: 480px) {
    .wallet-bar { gap: 6px; font-size: 14px; padding: 10px 12px; }
    .wallet-bar .wallet-amount { font-size: 20px; }
    .wallet-bar span:last-child { font-size: 11px; }
}

/* ══════════════════════════════════
   FOOTER
   ══════════════════════════════════ */
footer {
    background: var(--black);
    color: #888;
    text-align: center;
    padding: 18px 16px;
    font-size: 13px;
}

/* ══════════════════════════════════
   INFO / WARNING / PASSWORD BOXES
   ══════════════════════════════════ */
.info-box {
    background: #e7f3ff;
    border: 1px solid #b6d4fe;
    border-radius: 7px;
    padding: 13px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #084298;
    line-height: 1.5;
}
.info-box strong { color: #052c65; }

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 7px;
    padding: 13px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}
.warning-box strong { color: #664d03; }

.password-rules {
    background: #f8f9fa;
    border-radius: 7px;
    padding: 13px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #495057;
}
.password-rules ul { margin: 7px 0 0 18px; }
.password-rules li { margin-bottom: 4px; }

/* ── Help text under read-only fields ── */
.help-text {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* ══════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════ */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin .8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════
   PASSWORD TOGGLE
   ══════════════════════════════════ */
.pw-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.pw-wrapper input { padding-right: 40px !important; }
.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #888;
    z-index: 10;
    transition: color .2s;
    user-select: none;
    font-size: 15px;
}
.toggle-password:hover { color: var(--orange); }

/* ══════════════════════════════════
   intl-tel-input Overrides
   ══════════════════════════════════ */
.iti {
    width: 100% !important;
    display: block !important;
    margin-bottom: 0;
}
.iti input {
    display: block !important;
    width: 100% !important;
    padding: 10px 10px 10px 52px !important;
    line-height: normal !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    border: 1.5px solid var(--border) !important;
    background-color: #fff !important;
    box-shadow: none !important;
    outline: none !important;
    height: 44px !important;
    border-radius: 7px !important;
    font-family: 'DM Sans', sans-serif !important;
    transition: border-color .2s !important;
}
.iti input:focus { border-color: var(--orange) !important; }
.iti__country-list {
    z-index: 1000 !important;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    border: 1px solid var(--border);
    max-height: 200px;
    background-color: #fff;
}
.iti__selected-country { border-radius: 7px 0 0 7px; }

/* Prevent flag dropdown overflow on small screens */
@media (max-width: 380px) {
    .iti__country-list { width: 280px !important;
     }
}

