/*
 * Wizard – Create Plan (v2.1 compact)
 * Mobile-first design with selection-card UX
 * Accent: green (selections/active), blue (actions/navigation)
 */

/* ============================================================
   BASE / CONTAINER
   ============================================================ */

.wizard-container {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-top: 3px solid #22c55e;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    width: 100%;
    padding: 18px 16px 16px;
    margin-top: 6px;
    position: relative;
    overflow: visible;
}

.wizard-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(34,197,94,0.03) 0%, transparent 80px);
    pointer-events: none;
}


/* ============================================================
   STEP CONTAINER & TRANSITIONS
   ============================================================ */

.wizard-step { animation: wz-fade-in 0.28s ease-out; }
.wizard-step.hidden { display: none !important; }

@keyframes wz-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   STEP HEADER
   ============================================================ */

.step-header {
    text-align: center;
    margin-bottom: 14px;
}

/* Optional one-liner under the step heading (a step's "description") */
.step-description {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--bs-secondary-color);
}

/* Small circular icon – compact and thematic */
.step-illus {
    width: 38px;
    height: 38px;
    margin: 0 auto 8px;
    background: rgba(34,197,94,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
}

.step-illus svg { width: 18px; height: 18px; }

[data-bs-theme="dark"] .step-illus {
    background: rgba(34,197,94,0.18);
    color: #4ade80;
}

.step-badge {
    display: inline-block;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 7px;
    box-shadow: 0 2px 6px rgba(34,197,94,0.3);
}

.step-badge--create {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

/* The step's name. It is the one thing on screen that says where you are in a wizard whose steps
   otherwise look alike, so it is sized to be read first — well clear of the questions under it. */
.wizard-container h2 {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.4px;
    margin: 0 0 5px;
    color: var(--bs-heading-color);
}

.step-desc {
    font-size: 13px;
    color: var(--bs-secondary-color);
    margin: 0 0 5px;
}

.step-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--bs-secondary-color);
    opacity: 0.7;
    margin: 0;
}

.step-hint svg { flex-shrink: 0; opacity: 0.8; }

/* ============================================================
   FORM GROUPS & LABELS
   ============================================================ */

.form-group { margin-bottom: 12px; position: relative; }

/* A control's question. Every step is a short list of these, and each one is what the user is
   actually being asked — so it outranks everything inside the control it heads, and the hint that
   explains it is folded away behind the ⓘ (see wizard-controls.css). */
.form-label {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.2px;
    color: #111827;
    margin-bottom: 7px;
}

[data-bs-theme="dark"] .form-label { color: #f9fafb; }

.form-sublabel {
    font-size: 12px;
    color: var(--bs-secondary-color);
    margin: -3px 0 8px;
}

.optional-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ============================================================
   SELECTION CARDS – core component
   ============================================================ */

.sel-grid { display: grid; gap: 8px; }

.sel-grid--1  { grid-template-columns: 1fr; }
.sel-grid--2  { grid-template-columns: repeat(2, 1fr); }
.sel-grid--3  { grid-template-columns: repeat(3, 1fr); }
.sel-grid--4  { grid-template-columns: repeat(4, 1fr); }
.sel-grid--7  { grid-template-columns: repeat(7, 1fr); }
.sel-grid--dates { grid-template-columns: repeat(3, 1fr); }

.sel-card--span2 { grid-column: span 2; }

/* Base card */
.sel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: border-color 0.16s, background 0.16s, transform 0.1s, box-shadow 0.16s;
    text-align: center;
    min-height: 62px;
    position: relative;
    overflow: hidden;
}

.sel-card:hover:not(.sel-card--selected) {
    border-color: rgba(34,197,94,0.5);
    background: var(--bs-tertiary-bg);
}

.sel-card:active { transform: scale(0.97); }

.sel-card.sel-card--selected {
    border-color: #22c55e;
    background: rgba(34,197,94,0.08);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.2);
    animation: card-select 0.2s ease-out;
}

.sel-card.sel-card--selected::after {
    content: "";
    position: absolute;
    top: 5px; right: 5px;
    width: 7px; height: 7px;
    background: #22c55e;
    border-radius: 50%;
}

@keyframes card-select {
    0%   { transform: scale(0.97); }
    60%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.sel-card-icon {
    width: 24px; height: 24px;
    color: var(--bs-secondary-color);
    transition: color 0.16s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.sel-card-icon svg { width: 20px; height: 20px; }
.sel-card--selected .sel-card-icon { color: #22c55e; }

.sel-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-heading-color);
    line-height: 1.2;
}

.sel-card-sub {
    font-size: 11px;
    color: var(--bs-secondary-color);
    line-height: 1.2;
}

/* Day variant */
.sel-card--day {
    min-height: 42px;
    padding: 8px 3px;
    border-radius: 8px;
    gap: 0;
}

.sel-card--day .sel-card-title { font-size: 11px; font-weight: 700; }

/* Row variant – horizontal (fitness cards) */
.sel-card--row {
    flex-direction: row;
    text-align: left;
    padding: 10px 14px;
    min-height: 54px;
    gap: 12px;
    align-items: center;
}

.sel-card--row .sel-card-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
    flex-shrink: 0;
    transition: background 0.16s, color 0.16s;
}

.sel-card--row .sel-card-icon svg { width: 18px; height: 18px; }

.sel-card--row.sel-card--selected .sel-card-icon { background: rgba(34,197,94,0.15); }

.sel-card--row.sel-card--selected::after {
    top: 50%;
    transform: translateY(-50%);
}

.sel-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sel-card-body .sel-card-title { font-size: 13px; }
.sel-card-body .sel-card-sub   { font-size: 11px; }

.sel-icon--low      { color: #f59e0b; }
.sel-icon--moderate { color: #22c55e; }
.sel-icon--high     { color: #3b82f6; }

/* Fitness grid – 3 vertical cards side-by-side */
#fitnessGrid { gap: 6px; }
#fitnessGrid .sel-card { min-height: 0; padding: 10px 6px 8px; gap: 4px; }
#fitnessGrid .sel-card-icon { width: 26px; height: 26px; }
#fitnessGrid .sel-card-icon svg { width: 18px; height: 18px; }
#fitnessGrid .sel-card-body { gap: 1px; }
#fitnessGrid .sel-card-title { font-size: 12px; }
#fitnessGrid .sel-card-sub   { font-size: 10px; }

/* ============================================================
   ERROR MESSAGES
   ============================================================ */

.error-msg {
    display: none;
    font-size: 12px;
    color: #dc2626;
    background: #fee2e2;
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
}

.error-msg.visible { display: block; }

[data-bs-theme="dark"] .error-msg { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ============================================================
   DATE PICKER (calendar)
   ============================================================ */

.date-picker-wrapper { position: relative; display: flex; align-items: stretch; }

.date-picker-wrapper input[type="text"] {
    flex: 1;
    padding: 11px 52px 11px 14px;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 9px;
    font-size: 15px;
    font-weight: 500;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.date-picker-wrapper input[type="text"]:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.date-picker-wrapper input[type="text"]::placeholder {
    color: var(--bs-secondary-color);
    opacity: 0.6;
    font-weight: 400;
}

.hidden-date-input {
    position: absolute !important;
    width: 0 !important; height: 0 !important;
    opacity: 0 !important; pointer-events: none !important;
    overflow: hidden !important; border: none !important;
    padding: 0 !important; margin: 0 !important;
}

.date-picker-btn {
    position: absolute;
    right: 4px; top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    color: white;
    transition: opacity 0.15s, transform 0.12s;
}

.date-picker-btn:hover { opacity: 0.88; }
.date-picker-btn:active { transform: translateY(-50%) scale(0.95); }
.date-picker-btn svg { pointer-events: none; }

/* Calendar popup */
.calendar-overlay { position: fixed; inset: 0; z-index: 99; }

.calendar-popup {
    position: absolute;
    top: calc(100% + 5px);
    left: 0; right: 0;
    z-index: 100;
    background: var(--bs-body-bg);
    border: 1.5px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
    padding: 12px;
    user-select: none;
    -webkit-user-select: none;
}

.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.cal-header-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--bs-heading-color);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-align: center;
    flex: 1;
}

.cal-nav-btn {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    border-radius: 9px;
    cursor: pointer;
    color: var(--bs-body-color);
    transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.cal-nav-btn:hover { background: #22c55e; border-color: #22c55e; color: #fff; }
.cal-nav-btn svg { width: 22px; height: 22px; stroke-width: 2.5; }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 3px; }

.cal-weekday {
    text-align: center;
    font-size: 10px; font-weight: 700;
    color: var(--bs-secondary-color);
    padding: 3px 0;
    text-transform: uppercase;
}

.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.cal-day {
    display: flex; align-items: center; justify-content: center;
    height: 34px;
    font-size: 12px; font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.1s;
    color: var(--bs-body-color);
    border: none; background: transparent; padding: 0;
}

.cal-day:hover:not(.cal-disabled):not(.cal-selected) { background: var(--bs-tertiary-bg); }

.cal-day.cal-today:not(.cal-selected) { box-shadow: inset 0 0 0 2px #22c55e; font-weight: 700; }

.cal-day.cal-selected {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; font-weight: 700;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
}

.cal-day.cal-disabled { color: var(--bs-secondary-color); opacity: 0.3; cursor: default; }
.cal-day.cal-other-month { color: var(--bs-secondary-color); opacity: 0.4; }

/* ============================================================
   EXPORT – native select
   ============================================================ */

.form-select-native {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 9px;
    font-size: 14px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select-native:focus { outline: none; border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }

/* ============================================================
   FINAL STEP
   ============================================================ */

.plan-creation-info {
    padding: 14px;
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 10px;
    background: rgba(34,197,94,0.05);
    margin-bottom: 14px;
}

.plan-creation-info p { font-size: 13px; margin: 0; color: var(--bs-body-color); }

/* Request summary injected into the Create Plan step */
.wizard-request-summary .section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bs-heading-color);
    margin-top: 0;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--bs-border-color);
}

.wizard-request-summary .request-details {
    background-color: var(--bs-secondary-bg);
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* The grid inside it (.req-group / .req-field-*) is request-summary.css — the same stylesheet the
   dashboard's copy uses, so a question too long for its row behaves identically in both. Nothing
   about it is re-declared here: a `.wizard-request-summary .req-…` rule would outrank that
   stylesheet and quietly undo whichever part of it it repeated. */

.checkbox-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bs-border-color); }

.checkbox-group { display: flex; align-items: center; gap: 9px; }

.checkbox-group input[type="checkbox"] {
    width: 18px !important; height: 18px !important;
    flex-shrink: 0;
    accent-color: #22c55e;
    cursor: pointer;
}

.checkbox-group label { font-size: 13px; margin: 0; cursor: pointer; color: var(--bs-body-color); }

.terms-link { color: #22c55e; font-weight: 600; text-decoration: none; }
.terms-link:hover { text-decoration: underline; }

[data-bs-theme="dark"] .terms-link { color: #4ade80; }

.processing-state { text-align: center; padding: 32px 16px; }

.spinner {
    width: 42px; height: 42px;
    border: 3px solid var(--bs-border-color);
    border-top-color: #22c55e;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.success-state { text-align: center; padding: 24px 16px; }

.success-anim { width: 70px; height: 70px; margin: 0 auto 10px; }
.success-anim-svg { width: 70px; height: 70px; animation: suc-scale 0.35s ease-out; }

.success-anim-circle {
    stroke: #22c55e; stroke-width: 2;
    stroke-dasharray: 166; stroke-dashoffset: 166;
    stroke-linecap: round;
    animation: suc-circle 0.6s ease-out 0.1s forwards;
}

.success-anim-check {
    stroke: #22c55e; stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 48; stroke-dashoffset: 48;
    animation: suc-check 0.4s ease-out 0.55s forwards;
}

@keyframes suc-scale  { 0% { transform: scale(0); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes suc-circle { to { stroke-dashoffset: 0; } }
@keyframes suc-check  { to { stroke-dashoffset: 0; } }

.error-state { text-align: center; padding: 16px; }

.error-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(239,68,68,0.1);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    color: #dc2626;
}

.error-icon svg { width: 26px; height: 26px; }

.error-message-box {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
}

[data-bs-theme="dark"] .error-message-box { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #fca5a5; }

/* ============================================================
   NAVIGATION BUTTONS
   ============================================================ */

.wizard-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--bs-border-color);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 7px;
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.16s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 2px 7px rgba(34,197,94,0.32);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(34,197,94,0.4);
}

.btn-primary:active  { transform: translateY(0); }
.btn-primary:disabled { background: #86efac; box-shadow: none; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: var(--bs-body-bg);
    border: 1.5px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

.btn-secondary:hover { background: var(--bs-tertiary-bg); border-color: var(--bs-secondary-color); }

/* ============================================================
   MISC
   ============================================================ */

.char-counter { font-size: 11px; text-align: right; color: var(--bs-secondary-color); margin-top: 4px; }

textarea {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    font-size: 16px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    line-height: 1.55;
    min-height: 120px;
}

textarea:focus { outline: none; border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
textarea::placeholder { color: var(--bs-secondary-color); opacity: 0.65; }

.hidden { display: none !important; }

/* ============================================================
   DARK MODE
   ============================================================ */

[data-bs-theme="dark"] .wizard-container { box-shadow: 0 4px 16px rgba(0,0,0,0.28); }
[data-bs-theme="dark"] .calendar-popup   { box-shadow: 0 8px 28px rgba(0,0,0,0.32); }
[data-bs-theme="dark"] .sel-card.sel-card--selected { background: rgba(34,197,94,0.12); }
[data-bs-theme="dark"] .plan-creation-info { border-color: rgba(34,197,94,0.2); background: rgba(34,197,94,0.06); }
[data-bs-theme="dark"] .success-anim-circle,
[data-bs-theme="dark"] .success-anim-check { stroke: #4ade80; }

/* ============================================================
   RESPONSIVE – MOBILE (≤ 600px)
   ============================================================ */

@media (max-width: 600px) {
    .wizard-container { padding: 14px 12px 12px; }

    /* Still the loudest things on the step, one notch down for the narrower measure. */
    .wizard-container h2 { font-size: 21px; }
    .form-label { font-size: 16.5px; }

    .sel-grid--4 { grid-template-columns: repeat(2, 1fr); }

    .sel-grid--7 { gap: 4px; }
    .sel-card--day { min-height: 36px; padding: 6px 2px; }
    .sel-card--day .sel-card-title { font-size: 10px; }

    .sel-card { min-height: 58px; padding: 9px 6px; }
    .sel-card--row { min-height: 50px; padding: 9px 12px; gap: 10px; }

    .sel-grid--dates { gap: 6px; }
    .sel-card--date { min-height: 70px; }
    .date-card-date { font-size: 12px; }
    .date-card-label { font-size: 9px; }

    .time-stepper { gap: 4px; }
    .ts-sep { font-size: 18px; padding-top: 7px; }
    .ts-input { font-size: 20px; }
    .ts-btn { height: 30px; }
    .ts-field { max-width: 72px; }

    .slider-value { font-size: 28px; }

    .wizard-buttons { flex-direction: column-reverse; gap: 6px; }
    .btn { width: 100%; padding: 13px 18px; font-size: 15px; }
    .btn.hidden { display: none !important; }
}

/* ============================================================
   RESPONSIVE – TABLET (601px – 860px)
   ============================================================ */

@media (min-width: 601px) and (max-width: 860px) {
    .sel-grid--4 { grid-template-columns: repeat(4, 1fr); }
    .sel-grid--7 { grid-template-columns: repeat(7, 1fr); }
}

/* ============================================================
   INPUT HINTS
   Moved to wizard-controls.css, next to the ⓘ control that opens
   them — the two are one component and the hint is no longer on
   screen by default. Both files load together everywhere.
   ============================================================ */

/* ============================================================
   SPACING BETWEEN STEP INPUT GROUPS
   ============================================================ */
.form-group--spaced {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bs-border-color);
}

/* ============================================================
   DELIVERY STEP – layout (smaller View Format cards)
   ============================================================ */
.sel-grid--view { gap: 5px; }

.sel-card--view {
    min-height: 46px;
    padding: 6px 6px;
    gap: 3px;
    border-width: 1.5px;
    border-radius: 8px;
}

.sel-card--view .sel-card-icon { width: 18px; height: 18px; }
.sel-card--view .sel-card-icon svg { width: 14px; height: 14px; }
.sel-card--view .sel-card-title { font-size: 11.5px; font-weight: 600; }

.sel-card--view.sel-card--selected::after {
    width: 5px; height: 5px;
    top: 4px; right: 4px;
}

.delivery-explainer {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(37,99,235,0.25);
    background: rgba(37,99,235,0.05);
    border-radius: 10px;
}

.delivery-explainer-icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 7px;
    background: rgba(37,99,235,0.12);
    color: #2563eb;
}
.delivery-explainer-icon svg { width: 16px; height: 16px; }
[data-bs-theme="dark"] .delivery-explainer-icon { color: #93c5fd; }

.delivery-explainer-body { flex: 1; min-width: 0; }

.delivery-explainer-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bs-heading-color);
    line-height: 1.35;
    margin-bottom: 3px;
}

.delivery-explainer-text {
    font-size: 12.5px;
    color: var(--bs-body-color);
    margin: 0;
    line-height: 1.45;
}

/* ============================================================
   SCHEDULE STEP – weekly-segment explainer
   ============================================================ */
.schedule-explainer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.06);
    border-radius: 10px;
}

.schedule-explainer-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(34,197,94,0.15);
    color: #16a34a;
}
.schedule-explainer-icon svg { width: 18px; height: 18px; }
[data-bs-theme="dark"] .schedule-explainer-icon { color: #4ade80; }

.schedule-explainer-body { flex: 1; min-width: 0; }

.schedule-explainer-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bs-heading-color);
    margin-bottom: 4px;
    line-height: 1.35;
}
.schedule-explainer-title strong { color: #16a34a; font-weight: 700; }
[data-bs-theme="dark"] .schedule-explainer-title strong { color: #4ade80; }

.schedule-explainer-text {
    font-size: 12.5px;
    color: var(--bs-body-color);
    margin: 0 0 6px;
    line-height: 1.45;
}

.schedule-explainer-list {
    margin: 0; padding: 0;
    list-style: none;
    display: flex; flex-direction: column; gap: 2px;
}
.schedule-explainer-list li {
    position: relative;
    padding-left: 16px;
    font-size: 12px;
    color: var(--bs-body-color);
    line-height: 1.4;
}
.schedule-explainer-list li::before {
    content: "✓";
    position: absolute;
    left: 0; top: 0;
    color: #16a34a;
    font-weight: 700;
    font-size: 12px;
}
[data-bs-theme="dark"] .schedule-explainer-list li::before { color: #4ade80; }

/* ============================================================
   RACE TYPE GRID – compact horizontal layout (40px tall)
   Title and distance label sit side-by-side on one line.
   ============================================================ */
#raceTypeGrid .sel-card {
    min-height: 40px;
    padding: 6px 10px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
}

/* Wrapper that keeps title + sub on one line */
#raceTypeGrid .sel-card-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* Keep icon from shrinking */
#raceTypeGrid .sel-card-icon {
    flex-shrink: 0;
}

/* Selected dot stays at top-right */
#raceTypeGrid .sel-card.sel-card--selected::after {
    top: 5px;
    right: 5px;
    transform: none;
}

/* ============================================================
   AUTH COMPONENT – input field styling within wizard context
   Browser-default inputs have no border-radius/color; style
   them to match the wizard's polished look.
   ============================================================ */
.wizard-auth-container input[type="email"],
.wizard-auth-container input[type="password"],
.wizard-auth-container input[type="text"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    line-height: 1.5;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.wizard-auth-container input[type="email"]:focus,
.wizard-auth-container input[type="password"]:focus,
.wizard-auth-container input[type="text"]:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.wizard-auth-container input::placeholder {
    color: var(--bs-secondary-color);
    opacity: 0.65;
    font-weight: 400;
}

/* Inputs inside icon wrapper need extra left padding */
.wizard-auth-container .auth-input-wrapper input {
    padding-left: 44px;
}

/* Validation error state */
.wizard-auth-container input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}

/* Verification code – centred monospace, no icon padding */
.wizard-auth-container .auth-verification-code-group input {
    padding: 16px 20px;
    letter-spacing: 12px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.wizard-auth-container .auth-verification-code-group input::placeholder {
    letter-spacing: 12px;
    opacity: 0.4;
}

@media (max-width: 640px) {
    .wizard-auth-container .auth-verification-code-group input {
        font-size: 20px;
        letter-spacing: 8px;
        padding: 14px 16px;
    }
    .wizard-auth-container .auth-verification-code-group input::placeholder {
        letter-spacing: 8px;
    }
}
