/* ================================================================
   Personal Injury Settlement Calculator — personal-injury.css
   Mobile-first. Scoped to .pi-wrap
   ================================================================ */

.pi-wrap *, .pi-wrap *::before, .pi-wrap *::after {
    box-sizing: border-box; margin: 0; padding: 0;
}
.pi-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px; color: #1e293b;
    max-width: 960px; margin: 0 auto;
    background: #fff; border-radius: 16px;
    border: 1px solid #e2e8f0; overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────── */
.pi-header {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 24px; background: #0f2942;
}
.pi-header-icon {
    width: 44px; height: 44px; background: rgba(255,255,255,.12);
    border-radius: 10px; display: flex; align-items: center;
    justify-content: center; color: #7dd3fc; flex-shrink: 0;
}
.pi-title    { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.pi-subtitle { font-size: 12.5px; color: #7dd3fc; }

/* ── Layout ───────────────────────────────────────────────── */
.pi-body { display: flex; flex-direction: column; }
@media (min-width: 720px) {
    .pi-body    { flex-direction: row; align-items: flex-start; }
    .pi-form    { width: 55%; border-right: 1px solid #e2e8f0; }
    .pi-results { width: 45%; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
}

/* ── Form ─────────────────────────────────────────────────── */
.pi-form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pi-field { display: flex; flex-direction: column; gap: 6px; }
.pi-label { font-size: 12px; font-weight: 700; color: #334155; text-transform: uppercase; letter-spacing: .05em; }
.pi-opt   { font-weight: 400; color: #94a3b8; text-transform: none; letter-spacing: 0; font-size: 11px; }
.pi-hint  { font-size: 11.5px; color: #94a3b8; }
.pi-section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: #94a3b8;
    padding-bottom: 6px; border-bottom: 1px solid #f1f5f9;
}
.pi-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) { .pi-row-2 { grid-template-columns: 1fr; } }

/* Select */
.pi-select {
    width: 100%; padding: 10px 32px 10px 14px; height: 46px;
    border: 1.5px solid #cbd5e1; border-radius: 10px;
    font-size: 14px; color: #1e293b; background: #f8fafc;
    appearance: none; outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    transition: border-color .18s;
}
.pi-select:focus { border-color: #0369a1; background-color: #fff; }

/* Accident type grid */
.pi-type-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
@media (max-width: 480px) { .pi-type-grid { grid-template-columns: 1fr 1fr; } }
.pi-type-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 8px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    background: #f8fafc; font-size: 12.5px; font-weight: 600; color: #475569;
    cursor: pointer; transition: all .15s; text-align: center;
}
.pi-type-btn svg { color: #94a3b8; flex-shrink: 0; }
.pi-type-btn:hover  { border-color: #0369a1; color: #0369a1; background: #f0f9ff; }
.pi-type-btn:hover svg { color: #0369a1; }
.pi-type-btn.active { background: #0f2942; border-color: #0f2942; color: #fff; }
.pi-type-btn.active svg { color: #7dd3fc; }

/* Severity cards */
.pi-severity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pi-sev-btn {
    display: flex; flex-direction: column; gap: 3px;
    padding: 12px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    background: #f8fafc; text-align: left; cursor: pointer;
    transition: all .15s;
}
.pi-sev-btn:hover    { border-color: #0369a1; background: #f0f9ff; }
.pi-sev-btn.active   { border-color: #0369a1; background: #f0f9ff; box-shadow: 0 0 0 3px rgba(3,105,161,.1); }
.pi-sev-name  { font-size: 13px; font-weight: 700; color: #1e293b; }
.pi-sev-desc  { font-size: 11.5px; color: #64748b; line-height: 1.4; }
.pi-sev-mult  { font-size: 11px; font-weight: 700; color: #0369a1; margin-top: 2px; }
.pi-sev-btn.active .pi-sev-name { color: #0c4a6e; }

/* Inputs */
.pi-prefix-wrap, .pi-suffix-wrap {
    display: flex; align-items: center;
    border: 1.5px solid #cbd5e1; border-radius: 10px;
    overflow: hidden; background: #f8fafc; transition: border-color .18s;
}
.pi-prefix-wrap:focus-within,
.pi-suffix-wrap:focus-within { border-color: #0369a1; background: #fff; }
.pi-prefix, .pi-suffix {
    padding: 0 12px; font-size: 14px; font-weight: 600; color: #64748b;
    background: #f1f5f9; height: 46px; display: flex; align-items: center; flex-shrink: 0;
}
.pi-prefix { border-right: 1px solid #e2e8f0; }
.pi-suffix { border-left: 1px solid #e2e8f0; }
.pi-input {
    flex: 1; border: none; background: transparent; padding: 0 14px;
    height: 46px; font-size: 14px; color: #1e293b; outline: none;
    -moz-appearance: textfield; min-width: 0;
}
.pi-input::-webkit-outer-spin-button,
.pi-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Disclaimer */
.pi-disclaimer {
    display: flex; align-items: flex-start; gap: 8px;
    background: #fefce8; border: 1px solid #fde047;
    border-radius: 9px; padding: 10px 14px;
    font-size: 12.5px; color: #854d0e; line-height: 1.5;
}
.pi-disclaimer svg { flex-shrink: 0; margin-top: 1px; color: #ca8a04; }

/* ── Results ──────────────────────────────────────────────── */
.pi-results { background: #f8fafc; padding: 20px; }

.pi-placeholder {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 300px; gap: 14px;
    color: #94a3b8; text-align: center;
}
.pi-placeholder p { font-size: 13.5px; line-height: 1.6; max-width: 220px; }

/* Hero */
.pi-hero {
    background: #0f2942; border-radius: 14px;
    padding: 22px; text-align: center; margin-bottom: 16px;
}
.pi-hero-label  { font-size: 11px; font-weight: 700; color: #7dd3fc; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.pi-hero-amount { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1; }
.pi-hero-max    { color: #38bdf8; }
.pi-hero-dash   { font-size: 24px; color: rgba(255,255,255,.4); margin: 4px 0; }
.pi-hero-sub    { font-size: 12px; color: #7dd3fc; margin-top: 8px; }

/* Breakdown */
.pi-breakdown {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 16px; margin-bottom: 14px;
}
.pi-breakdown-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 12px; }
.pi-br-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.pi-br-row:last-child { border-bottom: none; }
.pi-br-name { color: #475569; }
.pi-br-val  { font-weight: 700; color: #1e293b; }
.pi-br-pain .pi-br-name { color: #0369a1; }
.pi-br-pain .pi-br-val  { color: #0369a1; }
.pi-br-gross .pi-br-name,
.pi-br-gross .pi-br-val { font-weight: 700; color: #1e293b; font-size: 13.5px; }
.pi-br-divider { height: 1px; background: #e2e8f0; margin: 4px 0; }
.pi-br-deduct .pi-br-name { color: #94a3b8; font-size: 12.5px; }
.pi-br-deduct .pi-br-val  { color: #ef4444; }
.pi-br-net .pi-br-name { font-weight: 700; color: #0f2942; }
.pi-br-net .pi-br-val  { font-weight: 800; color: #0f2942; font-size: 15px; }

/* Fairness score */
.pi-fairness {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 16px;
}
.pi-fairness-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 12px; }
.pi-fairness-row   { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pi-fairness-track { flex: 1; height: 10px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.pi-fairness-fill  { height: 100%; border-radius: 6px; transition: width .5s ease, background .3s; }
.pi-fairness-score { font-size: 20px; font-weight: 800; min-width: 36px; text-align: right; }
.pi-fairness-verdict {
    font-size: 13px; font-weight: 600; padding: 7px 12px;
    border-radius: 8px; margin-bottom: 8px; text-align: center;
}
.pi-fairness-offer-row {
    display: flex; justify-content: space-between;
    font-size: 13px; color: #64748b; padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}
.pi-fairness-offer-row span:last-child { font-weight: 700; color: #1e293b; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .pi-header     { padding: 16px; }
    .pi-form, .pi-results { padding: 16px; }
    .pi-title      { font-size: 16px; }
    .pi-hero-amount{ font-size: 34px; }
    .pi-type-grid  { grid-template-columns: 1fr 1fr; }
    .pi-severity-grid { grid-template-columns: 1fr 1fr; }
}
