/* ============================================================
   QUICK EXPERIENCE REQUEST — the three-step, click-first form.

   Design rules this stylesheet enforces:
     * Every choice is a target a thumb can hit (min 44px).
     * One step is visible at a time. No wall of inputs.
     * The primary action is always reachable — sticky on mobile.
     * Selected state is legible without colour alone (border + tick).
   Uses the design tokens from base.html.
   ============================================================ */

.qr-page { max-width: 720px; }

/* ---------- progress ---------- */
.qr-progress {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 18px;
}
.qr-progress-bar {
    flex: 1; height: 6px; border-radius: 999px;
    background: var(--surface-soft); overflow: hidden;
}
.qr-progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--orange) 100%);
    width: 33%; transition: width .25s ease;
}
.qr-progress-text {
    font-size: 0.82rem; font-weight: 700; color: var(--muted);
    white-space: nowrap;
}

/* ---------- experience banner ---------- */
.qr-chosen {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface-soft); border: 1px solid var(--line);
    border-radius: 16px; padding: 12px 16px; margin-bottom: 18px;
}
.qr-chosen i { color: var(--orange); font-size: 1.2rem; }
.qr-chosen strong { color: var(--ink); font-size: 1rem; display: block; }
.qr-chosen small { color: var(--muted); font-size: 0.8rem; }

/* ---------- steps ---------- */
.qr-step { display: none; }
.qr-step.is-active { display: block; animation: qrFade .2s ease; }
@keyframes qrFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.qr-step-title {
    font-size: 1.25rem; font-weight: 800; color: var(--ink);
    margin: 0 0 16px;
}

.qr-field { margin-bottom: 18px; }
.qr-label {
    display: flex; align-items: center; gap: 7px;
    font-weight: 700; color: var(--ink); font-size: 0.92rem;
    margin-bottom: 8px;
}
.qr-label i { color: var(--orange); width: 16px; text-align: center; }
.qr-label .qr-req { color: #d0342c; }
.qr-help { display: block; color: var(--muted); font-size: 0.79rem; margin-top: 6px; }
.qr-error {
    display: block; color: #d0342c; font-size: 0.82rem;
    font-weight: 600; margin-top: 6px;
}

/* ---------- chips ---------- */
.qr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-chip {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 44px; padding: 10px 16px; border-radius: 999px;
    border: 2px solid var(--line); background: var(--surface);
    color: var(--ink); font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: all .15s ease;
    font-family: var(--font-body);
}
.qr-chip:hover { border-color: var(--blue); }
.qr-chip[aria-pressed="true"] {
    border-color: var(--blue); background: var(--blue); color: #fff;
}
.qr-chip[aria-pressed="true"]::before {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    font-size: 0.72rem;
}
.qr-chip i { font-size: 0.85rem; }

/* ---------- cards ---------- */
.qr-cards {
    display: grid; gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.qr-card {
    min-height: 58px; padding: 14px 16px; border-radius: 14px;
    border: 2px solid var(--line); background: var(--surface);
    color: var(--ink); font-weight: 700; font-size: 0.92rem;
    cursor: pointer; text-align: left; transition: all .15s ease;
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-body);
}
.qr-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.qr-card[aria-pressed="true"] {
    border-color: var(--blue); background: var(--surface-soft);
    box-shadow: inset 0 0 0 1px var(--blue);
}
.qr-card[aria-pressed="true"] .qr-card-tick { opacity: 1; }
.qr-card-tick { margin-left: auto; color: var(--blue); opacity: 0; }

/* ---------- segmented ---------- */
.qr-segmented {
    display: inline-flex; border: 2px solid var(--line);
    border-radius: 999px; overflow: hidden; background: var(--surface);
}
.qr-segmented button {
    min-width: 56px; min-height: 44px; padding: 0 18px; border: none;
    background: transparent; color: var(--ink); font-weight: 700;
    cursor: pointer; font-family: var(--font-body); font-size: 0.95rem;
}
.qr-segmented button[aria-pressed="true"] {
    background: var(--blue); color: #fff;
}

/* ---------- stepper ---------- */
.qr-stepper { display: inline-flex; align-items: center; gap: 4px; }
.qr-stepper button {
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid var(--line); background: var(--surface);
    color: var(--blue); font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.qr-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.qr-stepper output {
    min-width: 52px; text-align: center; font-weight: 800;
    font-size: 1.1rem; color: var(--ink);
}

/* ---------- toggle ---------- */
.qr-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 8px 16px; border-radius: 999px;
    border: 2px dashed var(--line); background: var(--surface);
    color: var(--muted); font-weight: 600; cursor: pointer;
    font-family: var(--font-body); font-size: 0.88rem;
}
.qr-toggle[aria-pressed="true"] {
    border-style: solid; border-color: var(--orange);
    color: var(--ink); background: var(--surface-warm);
}

/* ---------- text inputs (the only three) ---------- */
.qr-input, .qr-textarea {
    width: 100%; padding: 13px 15px; border-radius: 14px;
    border: 2px solid var(--line); background: var(--surface);
    font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
}
.qr-input:focus, .qr-textarea:focus {
    outline: none; border-color: var(--blue);
}
.qr-textarea { min-height: 84px; resize: vertical; }
.qr-native-date, .qr-native-time { max-width: 220px; }

/* ---------- conditional "other" ---------- */
.qr-other { margin-top: 10px; }
.qr-other[hidden] { display: none !important; }

/* ---------- details disclosure ---------- */
.qr-details { margin-top: 8px; }
.qr-details > summary {
    cursor: pointer; color: var(--blue); font-weight: 700;
    font-size: 0.88rem; list-style: none; padding: 10px 0;
    display: inline-flex; align-items: center; gap: 8px;
}
.qr-details > summary::-webkit-details-marker { display: none; }
.qr-details > summary::before {
    content: "\2b"; font-weight: 900; font-size: 0.9rem;
}
.qr-details[open] > summary::before { content: "\2212"; }

/* ---------- notices ---------- */
.qr-notice {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--surface-warm); border-radius: 14px;
    padding: 12px 15px; color: var(--ink); font-size: 0.86rem;
    line-height: 1.5; margin-bottom: 18px;
}
.qr-notice i { color: var(--orange); margin-top: 2px; }
.qr-notice-plain { background: var(--surface-soft); }
.qr-notice-plain i { color: var(--blue); }

.qr-form-error {
    background: #fdeceb; border: 1px solid #f5c2be; color: #a32b22;
    border-radius: 14px; padding: 12px 15px; font-size: 0.9rem;
    font-weight: 600; margin-bottom: 14px;
}

/* ---------- actions ---------- */
.qr-actions {
    display: flex; gap: 10px; align-items: center;
    margin-top: 24px;
}
.qr-actions .pg-btn { flex: 1; }
/* Safari can let an authored display rule override the browser's native
   [hidden] rule. Keep only the action for the active wizard step visible. */
.qr-actions .pg-btn[hidden] { display: none !important; }
.qr-back {
    background: var(--surface-soft); color: var(--ink);
    flex: 0 0 auto !important; min-width: 96px;
}

/* Sticky on mobile: the primary action must never be below the fold. */
@media (max-width: 720px) {
    .qr-page { padding-bottom: 110px; }
    .qr-actions {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
        margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: var(--surface);
        border-top: 1px solid var(--line);
        box-shadow: 0 -6px 20px rgba(30,79,145,0.08);
    }
    .qr-cards { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

/* ============================================================
   SUBMITTED CONFIRMATION
   ============================================================ */
.qr-done { max-width: 640px; text-align: center; }
.qr-done-icon {
    width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue) 0%, var(--orange) 100%);
    color: #fff; font-size: 2.2rem;
}
.qr-done h1 { font-size: 1.8rem; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.qr-done-ref {
    display: inline-block; font-family: monospace; font-size: 1.05rem;
    font-weight: 700; letter-spacing: 0.06em; color: var(--blue);
    background: var(--surface-soft); border-radius: 999px;
    padding: 8px 20px; margin-bottom: 18px;
}
.qr-done-list {
    text-align: left; list-style: none; padding: 0; margin: 0 0 24px;
    display: grid; gap: 12px;
}
.qr-done-list li {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; padding: 14px 16px;
}
.qr-done-list i { color: var(--blue); margin-top: 3px; width: 18px; text-align: center; }
.qr-done-list span { color: var(--ink); font-size: 0.92rem; line-height: 1.5; }
.qr-done-list b { display: block; font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--muted); margin-bottom: 2px; font-weight: 700; }
.qr-done-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   REQUEST LIST + BUDDY OPTIONS
   ============================================================ */
.qr-list { display: grid; gap: 14px; }
.qr-req-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; padding: 18px;
}
.qr-req-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.qr-req-title { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.qr-req-meta { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.qr-badge {
    display: inline-block; padding: 5px 12px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; white-space: nowrap;
    background: var(--surface-soft); color: var(--blue);
}
.qr-badge-action { background: var(--surface-warm); color: #b4600d; }
.qr-badge-done { background: #e8f6ed; color: #1c7a41; }
.qr-badge-off { background: #f2f3f5; color: #6b7280; }
.qr-req-update { color: var(--muted); font-size: 0.84rem; margin-top: 10px; }

.qr-options { display: grid; gap: 12px; margin: 16px 0; }
.qr-option {
    display: flex; gap: 14px; align-items: flex-start; text-align: left;
    border: 2px solid var(--line); border-radius: 18px; padding: 16px;
    background: var(--surface); cursor: pointer; width: 100%;
    font-family: var(--font-body); transition: all .15s ease;
}
.qr-option:hover { border-color: var(--blue); }
.qr-option[aria-pressed="true"] {
    border-color: var(--blue); background: var(--surface-soft);
}
.qr-option-photo {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    flex: 0 0 auto; background: var(--surface-soft);
}
.qr-option-body { flex: 1; min-width: 0; }
.qr-option-name { font-weight: 800; color: var(--ink); font-size: 1rem; }
.qr-option-facts { color: var(--muted); font-size: 0.82rem; margin-top: 4px; line-height: 1.55; }
.qr-option-why { color: var(--ink); font-size: 0.86rem; margin-top: 8px; }
.qr-option-price { font-weight: 800; color: var(--blue); white-space: nowrap; }
.qr-verified { color: #1c7a41; font-weight: 700; }

/* ==========================================================================
   PREMIER — service package cards + the pre-submit recap.
   Same light wizard surface as every other request; the gold is the site's
   own --gold and appears only on the highlighted package and its badge.
   ========================================================================== */
.qr-pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.qr-pkg {
    display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
    position: relative; text-align: left; width: 100%;
    border: 2px solid var(--line); border-radius: 18px; padding: 16px 16px 14px;
    background: var(--surface); cursor: pointer;
    font-family: var(--font-body); transition: border-color .15s ease, box-shadow .15s ease;
}
.qr-pkg:hover { border-color: var(--blue); }
.qr-pkg[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 6px 22px rgba(200, 154, 50, 0.18); }
.qr-pkg-hot { border-color: rgba(200, 154, 50, 0.55); }

.qr-pkg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.qr-pkg-head b { font-size: 1rem; color: var(--ink); }
.qr-pkg-badge {
    padding: 3px 10px; border-radius: 999px; font-size: 0.62rem; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase;
    background: linear-gradient(120deg, #f3dfb0, var(--gold)); color: #1e2a52;
}
.qr-pkg-line { color: var(--ink); font-size: 0.85rem; }
.qr-pkg-price { color: var(--blue); font-weight: 800; font-size: 0.9rem; }
.qr-pkg-incl { display: flex; gap: 7px; align-items: baseline; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.qr-pkg-incl i { color: var(--gold); font-size: 0.66rem; }
.qr-pkg .qr-card-tick { position: absolute; top: 12px; right: 12px; color: var(--gold); opacity: 0; }
.qr-pkg[aria-pressed="true"] .qr-card-tick { opacity: 1; }

.qr-pkg-note {
    display: flex; gap: 8px; align-items: baseline; margin-top: 10px;
    color: var(--muted); font-size: 0.8rem; line-height: 1.55;
}
.qr-pkg-note i { color: var(--gold); font-size: 0.72rem; }

/* the recap on the final step */
.qr-recap {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-top: 18px; padding: 14px 16px;
    border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft);
}
.qr-recap-title { width: 100%; color: var(--ink); font-size: 0.9rem; }
.qr-recap-row {
    padding: 5px 12px; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--line); color: var(--ink); font-size: 0.8rem; font-weight: 600;
}
.qr-recap-note { width: 100%; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.qr-recap-strong { color: var(--ink); font-weight: 700; }

@media (max-width: 720px) {
    .qr-pkgs { grid-template-columns: 1fr; }
}

/* PREMIER — journey tracker + expense report on the request page */
.xr-journey { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.xr-journey li { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.xr-journey li i { font-size: 0.72rem; color: var(--line); }
.xr-journey li.is-done { color: var(--ink); }
.xr-journey li.is-done i { color: #1c7a41; }
.xr-journey li.is-now { color: var(--ink); }
.xr-journey li.is-now i { color: var(--gold); }
.xr-plan-h { font-size: 0.92rem; margin: 14px 0 6px; color: var(--ink); }
.xr-expense-table th, .xr-expense-table td { font-size: 0.84rem; }

/* PREMIER — the success screen's gold check + next-steps promise */
.qr-done-gold { background: linear-gradient(120deg, #f3dfb0, var(--gold)) !important; color: #1e2a52 !important; box-shadow: 0 14px 34px rgba(200, 154, 50, 0.30) !important; }
.qr-done-premier { max-width: 560px; margin: 20px auto 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); text-align: left; }
.qr-done-premier h2 { font-size: 1rem; margin: 0 0 8px; color: var(--ink); }
.qr-done-premier ol { margin: 0 0 12px 18px; padding: 0; color: var(--ink); font-size: 0.88rem; line-height: 1.8; }
.qr-done-trust, .qr-done-mail { display: flex; gap: 9px; align-items: baseline; color: var(--muted); font-size: 0.84rem; line-height: 1.6; margin: 0 0 8px; }
.qr-done-trust i, .qr-done-mail i { color: var(--gold); font-size: 0.78rem; }
.qr-done-trust b { color: var(--ink); }

/* PREMIER — the gold Hangout mark, everywhere Premier speaks */
.qr-premier-logo {
    width: 46px; height: auto; flex: 0 0 auto;
    filter: drop-shadow(0 4px 12px rgba(200, 154, 50, 0.25));
}
.qr-premier-logo-lg { display: block; width: 78px; margin: 0 auto 12px; }
.qr-premier-logo-sm { width: 22px; vertical-align: -6px; margin-right: 4px; }
.xr-journey-brand {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 12px; color: var(--gold); font-size: 0.74rem;
    font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase;
}
.xr-journey-brand img { width: 30px; height: auto; }
