/* Car-Rental Demo — styles for booking form + confirmation receipt. */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    background: #f5f6fa;
    color: #0f172a;
    line-height: 1.5;
    padding: 24px 16px 32px;
    -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; color: #0f172a; letter-spacing: -0.01em; }

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
}

/* ──────── booking form (/) ──────── */
main.card {
    width: 480px;
    max-width: 100%;
    margin: 32px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.12),
                0 4px 8px -2px rgba(15, 23, 42, 0.05);
    padding: 32px 36px;
}

.card-header h1 { font-size: 22px; color: #1e293b; margin-bottom: 4px; }
.subtitle { margin: 0 0 24px 0; color: #64748b; font-size: 13px; }

.form-row { margin-bottom: 16px; }
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

input[type="text"], input[type="date"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

textarea { resize: vertical; min-height: 72px; }

button[type="submit"], .btn, .btn-primary {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary, button[type="submit"] {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover, button[type="submit"]:hover {
    background: #4338ca;
    box-shadow: 0 4px 12px -2px rgba(67, 56, 202, 0.35);
}

.error-banner {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* ──────── confirmation page (2-col grid, no-scroll layout) ──────── */
main.container.confirmation {
    width: 960px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.confirmation-header,
.confirmation section.card.cost-card,
.confirmation .actions,
.confirmation .evidence-footer {
    grid-column: 1 / -1;
}

.confirmation-header { margin-bottom: 4px; }

.badge-success {
    display: inline-block;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.confirmation-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

section.card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 18px 22px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06),
                0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
    align-self: stretch;
}

section.card h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 0 0 14px 0;
}

dl.kv {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 6px 14px;
    margin: 0;
}

dl.kv dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    align-self: center;
    margin: 0;
}

dl.kv dd {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 500;
    align-self: center;
    word-break: break-word;
}

.address-raw { margin: 0 0 8px 0; font-size: 15px; color: #0f172a; font-weight: 500; }
.address-geo {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #334155;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}
.muted-label { color: #94a3b8; font-size: 12px; }
.transform-note { margin: 4px 0 0 0; font-size: 12px; color: #94a3b8; font-style: italic; }

.booking-date { margin: 0 0 4px 0; font-size: 15px; color: #0f172a; font-weight: 500; }

/* ── Total card — the demo's headline (no breakdown shown, by design) ── */
section.card.cost-card {
    border: 1.5px solid #c7d2fe;
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%);
    box-shadow: 0 4px 16px -4px rgba(79, 70, 229, 0.18),
                0 1px 3px rgba(15, 23, 42, 0.06);
}

section.card.cost-card h2 { color: #4338ca; }

.rental-cost-display {
    font-size: 48px;
    font-weight: 700;
    color: #4338ca;
    text-align: center;
    margin: 12px 0 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.rental-cost-label { text-align: center; margin: 0; color: #64748b; font-size: 13px; }

.actions { margin: 8px 0 0 0; text-align: center; }
.actions .btn-primary { width: auto; min-width: 200px; }

.evidence-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

a { color: #4f46e5; text-decoration: none; }
a:hover { text-decoration: underline; }

@media (max-width: 860px) {
    main.container.confirmation { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    body { padding: 16px 12px 24px; }
    main.container.confirmation, main.card { margin: 0 auto; }
    section.card { padding: 14px 16px; }
    dl.kv { grid-template-columns: 1fr; gap: 2px 0; }
    dl.kv dt { padding-top: 6px; }
    .confirmation-header h1 { font-size: 22px; }
    .rental-cost-display { font-size: 36px; }
}
