/* =============================================================================
   /rides/assets/css/request.css
   Request page styles — loaded on top of app.css.
   ============================================================================= */

.request-body {
    background: var(--muted);
    padding-bottom: 120px;   /* room for sticky summary bar */
}

/* --------- Top header bar --------- */
.r-header {
    background: var(--green-2);
    color: var(--white);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}
.r-back {
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.r-back:hover { background: rgba(255,255,255,0.2); }
.r-header-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 4px;
}
.r-event-pill {
    background: rgba(255,255,255,0.18);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------- Main content --------- */
.r-main {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px;
}

/* --------- Sections (progressive disclosure) --------- */
.r-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.r-section.r-active { box-shadow: 0 4px 24px rgba(1, 68, 33, 0.12); }
.r-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
}
.r-section-head h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--green-2);
    flex: 1;
}
.r-section-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--muted);
    color: var(--granite);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.r-section.r-active .r-section-num {
    background: var(--green);
    color: var(--white);
}
.r-section.r-completed .r-section-num {
    background: var(--success);
    color: var(--white);
}
.r-section-status {
    color: var(--granite);
    font-size: 1rem;
    font-weight: 700;
}
.r-section.r-completed .r-section-status {
    color: var(--success);
}

/* Body collapses */
.r-section-body {
    padding: 0 18px 18px;
    max-height: 2000px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.r-section.r-collapsed .r-section-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
.r-section.r-completed .r-section-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.r-help {
    color: var(--granite);
    font-size: 0.85rem;
    margin: 0 0 12px;
    line-height: 1.4;
}

/* --------- Spot list (radio cards) --------- */
.r-spot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.r-spot-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid var(--grey);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.r-spot-option:active,
.r-spot-option:hover { border-color: var(--green); }
.r-spot-option input[type="radio"] {
    accent-color: var(--green);
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}
.r-spot-option:has(input[type="radio"]:checked) {
    border-color: var(--green);
    background: var(--green-tint);
}
.r-spot-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.3;
}
.r-spot-notes {
    font-size: 0.8rem;
    color: var(--granite);
    margin-top: 2px;
}

/* --------- Pickup pin states --------- */
.btn-medium {
    padding: 13px 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.r-pickup-confirmed {
    background: var(--green-tint);
    border: 1.5px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.r-pickup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.r-pickup-label {
    font-weight: 600;
    color: var(--green-2);
    font-size: 0.95rem;
}
.r-pickup-coords {
    font-size: 0.78rem;
    color: var(--granite);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.r-link-btn {
    background: none;
    border: 0;
    color: var(--green);
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    text-align: right;
    line-height: 1.2;
}

.r-map {
    height: 280px;
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 8px 0 12px;
    z-index: 0;
}

/* --------- Stepper --------- */
.r-stepper-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}
.r-stepper {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1.5px solid var(--grey);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 180px;
    margin-bottom: 8px;
}
.r-step-btn {
    flex: 1;
    background: var(--white);
    border: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--green);
    cursor: pointer;
    padding: 12px 0;
    line-height: 1;
    transition: background-color 0.1s;
}
.r-step-btn:active { background: var(--green-tint); }
.r-stepper input[type="number"] {
    flex: 1.2;
    border: 0;
    border-left: 1px solid var(--grey);
    border-right: 1px solid var(--grey);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black);
    background: var(--white);
    width: 60px;
    -moz-appearance: textfield;
}
.r-stepper input[type="number"]::-webkit-outer-spin-button,
.r-stepper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.r-split-note {
    background: #fff4d6;
    color: var(--warn);
    border: 1px solid #f0d99e;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* --------- Checkbox --------- */
.r-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--black);
}
.r-checkbox input[type="checkbox"] {
    accent-color: var(--green);
    width: 20px;
    height: 20px;
    margin: 0;
}

/* --------- Notes details --------- */
.r-notes-details {
    margin-top: 8px;
}
.r-notes-details summary {
    color: var(--granite);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 0;
    list-style: none;
    user-select: none;
}
.r-notes-details summary::-webkit-details-marker { display: none; }
.r-notes-details summary::before {
    content: '+ ';
    color: var(--green);
    font-weight: 700;
}
.r-notes-details[open] summary::before { content: '− '; }
.r-notes-details textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1.5px solid var(--grey);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--white);
    resize: vertical;
}
.r-notes-details textarea:focus {
    outline: none;
    border-color: var(--green);
}

/* --------- Contact inputs --------- */
.r-input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--black);
    margin: 8px 0 6px;
}
.r-section-body input[type="text"],
.r-section-body input[type="tel"] {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 1.5px solid var(--grey);
    border-radius: var(--radius-sm);
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}
.r-section-body input:focus {
    outline: none;
    border-color: var(--green);
}

/* --------- Field error --------- */
.field-error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 4px;
    line-height: 1.3;
}

/* --------- Sticky summary + submit --------- */
.r-summary {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px 18px;
    margin: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    border-top: 1px solid var(--grey);
}
.r-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
}
.r-summary-row span {
    color: var(--granite);
    font-size: 0.9rem;
}
.r-summary-row strong {
    color: var(--green);
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.r-summary-meta {
    color: var(--granite);
    font-size: 0.78rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* =============================================================================
   PATCH 1 — pickup address display (replaces lat/lng for human readability)
   ============================================================================= */
.r-pickup-coords {
    /* now used for full street addresses, can wrap onto multiple lines */
    max-width: 240px;
    word-wrap: break-word;
    font-variant-numeric: normal;
    font-size: 0.85rem;
    color: var(--black);
    margin-top: 4px;
    line-height: 1.3;
}
.r-pickup-coords-fallback {
    /* When geocoder fails and we show raw lat/lng instead */
    color: var(--granite);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}
