/* driver-register-base.css
 * Shared stylesheet for the FindMyRide driver registration flow
 * (agreement, register_1 through register_12, login, reset).
 * Extracted from the inline <style> block previously in register_head.phtml.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --ink:     #0f0e0c;
    --paper:   #f5f2ed;
    --cream:   #ede9e2;
    --gold:    #b8933a;
    --gold-lt: #d4aa55;
    --accent:  #1a3a2a;
    --rule:    #c8c0b4;
    --text:    #2c2a26;
    --muted:   #7a766e;
    --serif:   'DM Serif Display', Georgia, serif;
    --sans:    'DM Sans', system-ui, sans-serif;
    --radius:  4px;

    /* Form / interactive accent — used for focus rings, progress dots,
       and the document-upload flow (camera button, confirm-card inputs). */
    --form-accent:     #4f46e5;
    --form-accent-lt:  #818cf8;
    --form-success:    #16a34a;
    --form-success-lt: #34d399;
    --form-warn:       #b45309;
    --form-warn-bg:    #fdf3e0;
    --form-danger:     #991b1b;
    --form-danger-bg:  #fee2e2;
    --form-danger-rule:#fca5a5;
}

html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.7; min-height: 100vh; }

/* Banner */
.banner { background: var(--accent); color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.banner-logo { font-family: var(--serif); font-size: 1.15rem; }
.banner-step { margin-left: auto; font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }

/* Progress */
.progress-strip { height: 3px; background: var(--cream); }
.progress-fill  { height: 100%; background: var(--gold); transition: width .4s ease; }

/* Agreement styles */
.page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.doc-eyebrow { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.doc-title { font-family: var(--serif); font-size: clamp(1.8rem,4vw,2.6rem); line-height: 1.2; color: var(--ink); margin-bottom: 6px; }
.doc-subtitle { font-size: .85rem; color: var(--muted); margin-bottom: 32px; }
.rule { border: none; border-top: 1px solid var(--rule); margin: 28px 0; }
.rule-heavy { border: none; border-top: 2px solid var(--ink); margin: 32px 0 24px; }
.principles-card { background: var(--accent); color: #fff; border-radius: 8px; padding: 28px 32px; margin-bottom: 36px; }
.principles-card h3 { font-family: var(--serif); font-size: 1.1rem; font-style: italic; margin-bottom: 16px; color: var(--gold-lt); }
.principles-list { list-style: none; display: grid; gap: 12px; }
.principles-list li { display: flex; gap: 12px; font-size: .88rem; line-height: 1.55; color: rgba(255,255,255,.88); }
.principles-list li::before { content: '▸'; color: var(--gold-lt); font-size: .8rem; flex-shrink: 0; margin-top: 3px; }
.principles-list strong { color: #fff; font-weight: 600; }
.ag-section { margin-bottom: 28px; }
.ag-section-num { font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.ag-section h2 { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin-bottom: 10px; }
.ag-section p { font-size: .9rem; color: var(--text); margin-bottom: 8px; }
.ag-section ul { list-style: none; padding-left: 0; display: grid; gap: 7px; margin-top: 8px; }
.ag-section ul li { display: flex; gap: 10px; font-size: .88rem; color: var(--text); line-height: 1.55; }
.ag-section ul li::before { content: '—'; color: var(--gold); flex-shrink: 0; font-weight: 700; }
.ag-section ul li strong { color: var(--ink); }
.fee-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .88rem; }
.fee-table th { background: var(--cream); padding: 8px 14px; text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--rule); }
.fee-table td { padding: 10px 14px; border-bottom: 1px solid var(--rule); color: var(--text); vertical-align: top; }
.fee-table td:first-child { font-weight: 500; color: var(--ink); }
.fee-amount { font-family: var(--serif); font-size: 1.05rem; color: var(--accent); }
.law-callout { background: #f0ece4; border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.6; }
.law-callout strong { color: var(--ink); }
.law-ref { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.agreement-box { background: var(--cream); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 28px 32px; margin-top: 40px; }
.agreement-box h3 { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin-bottom: 8px; }
.agreement-box > p { font-size: .85rem; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.check-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; cursor: pointer; }
.check-row input[type=checkbox] { appearance: none; width: 20px; height: 20px; border: 2px solid var(--rule); border-radius: 3px; background: #fff; flex-shrink: 0; margin-top: 2px; cursor: pointer; transition: all .15s; position: relative; }
.check-row input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
.check-row input[type=checkbox]:checked::after { content: ''; position: absolute; left: 5px; top: 2px; width: 6px; height: 10px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }
.check-label { font-size: .88rem; color: var(--text); line-height: 1.6; user-select: none; }
.check-label strong { color: var(--ink); }
.agree-btn { width: 100%; padding: 15px 24px; background: var(--accent); color: #fff; font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: .03em; border: none; border-radius: var(--radius); cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.agree-btn:hover:not(:disabled) { background: #244d36; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,58,42,.3); }
.agree-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.agree-btn .arrow { transition: transform .2s; }
.agree-btn:hover:not(:disabled) .arrow { transform: translateX(4px); }
.decline-link { display: block; text-align: center; margin-top: 14px; font-size: .8rem; color: var(--muted); text-decoration: none; }
.decline-link:hover { color: var(--text); }
.doc-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.doc-footer span { font-size: .72rem; color: var(--muted); }
.scroll-notice { text-align: center; font-size: .75rem; color: var(--muted); margin-bottom: 24px; display: flex; align-items: center; justify-content: center; gap: 6px; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }
#readProgress { position: fixed; top: 0; left: 0; height: 2px; background: var(--gold); width: 0%; transition: width .1s; z-index: 200; pointer-events: none; }

/* Registration form styles */
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: #374151; transition: all .3s; }
.step-dot.active   { background: var(--form-accent); transform: scale(1.3); }
.step-dot.complete { background: var(--form-success); }
.doc-card { border: 2px dashed #374151; border-radius: 14px; padding: 20px; text-align: center; cursor: pointer; transition: all .2s; }
.doc-card:hover  { border-color: var(--form-accent); }
.doc-card.done   { border-color: var(--form-success); border-style: solid; }
.step-panel { display: none; }
.step-panel.active { display: block; }
#cameraSection { display: none; }
.spin { display:inline-block;width:18px;height:18px;border:2px solid rgba(79,70,229,.3);border-radius:50%;border-top-color:var(--form-accent);animation:spin .6s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.error-banner { background: var(--form-danger-bg); border: 1px solid var(--form-danger-rule); border-radius: 8px; padding: 12px 16px; font-size: .85rem; color: var(--form-danger); margin-bottom: 20px; }

@media (max-width: 600px) {
    .page { padding: 32px 16px 60px; }
    .principles-card { padding: 20px; }
    .agreement-box { padding: 20px; }
    .fee-table th, .fee-table td { padding: 8px 10px; }
}

/* ──────────────────────────────────────────────────────────────────────────
 * Document upload confirm card (register_5 through register_11)
 * Used by /js/doc-upload.js — showConfirmCard(). Previously undefined,
 * which caused inputs to render unstyled (invisible against --paper bg).
 * Themed to match the paper/gold palette above, not a dark theme.
 * ────────────────────────────────────────────────────────────────────────── */
#confirmCard {
    background: #fff;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--form-accent);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-top: 16px;
}
#confirmCard.hidden { display: none; }

#confirmCard h3 {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 12px;
}

.field-note {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.field-row { margin-bottom: 14px; }

.field-row label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.field-row .req { color: var(--form-danger); }

.field-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: .92rem;
    color: var(--text);
    font-family: var(--sans);
}
.field-input:focus {
    outline: none;
    border-color: var(--form-accent);
    box-shadow: 0 0 0 2px rgba(79,70,229,.18);
}
.field-input.border-warn { border-color: var(--form-danger); }
.field-input::placeholder { color: var(--muted); opacity: .7; }

/* bool-display fields (e.g. CoF plate matched) */
.text-ok    { color: var(--form-success); font-size: .88rem; font-weight: 600; }
.text-warn  { color: var(--form-warn);    font-size: .88rem; font-weight: 600; }
.text-muted { color: var(--muted);        font-size: .88rem; }

/* info / hint boxes */
.info-box {
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: .83rem;
    margin-bottom: 14px;
    line-height: 1.55;
}
.info-box.blue   { background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; }
.info-box.yellow { background: var(--form-warn-bg); border: 1px solid #f0c987; color: var(--form-warn); }
.info-box.grey   { background: var(--cream); border: 1px solid var(--rule); color: var(--muted); }
.info-box.mt-2   { margin-top: 10px; }

.error-msg { color: var(--form-danger); font-size: .83rem; margin: 8px 0; }
.error-msg.hidden { display: none; }

.btn-row { display: flex; gap: 10px; }
.btn-row.mt-4 { margin-top: 18px; }

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: none;
    font-size: .88rem;
    font-weight: 700;
    font-family: var(--sans);
    cursor: pointer;
    transition: all .15s;
}
.btn-primary   { background: var(--form-accent); color: #fff; }
.btn-primary:hover   { background: #4338ca; }
.btn-secondary { background: var(--cream); color: var(--text); border: 1px solid var(--rule); }
.btn-secondary:hover { background: var(--rule); }
