/*
 * _page.css
 *
 * USED BY:
 *   - home-user-reciept.html
 *   - payment.html
 *   - signup.html
 */

.page {
    padding: 0 var(--pad) 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page h1 {
    font-size: 2.5rem;
    color: var(--red);
    margin-bottom: 1.5rem;
    padding-top: 2rem;
}

.page:only-child {
    min-height: 100vh;
    justify-content: center;
}

main:has(> .btn--back:first-child) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.form-fields .row div {
    flex: 1;
}

.page .btn--outline {
    margin-top: 1rem;
}

/* ── Summary totals ──────────────────────────────── */
.summary .row {
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: var(--font-sm);
}

.summary .row.total {
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 0.3rem;
}

section.summary {
    border-top: 2px solid var(--black);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

/* ── Time picker (expandable) ────────────────────── */
.time-wrap {
    display: inline-flex;
    flex-direction: column;
}

.time-wrap .badge {
    align-self: stretch;
    text-align: center;
    justify-content: center;
}

.time-picker {
    max-height: 0;
    overflow: hidden;
    background: var(--navy);
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1rem;
}

.time-picker.visible {
    max-height: 300px;
    padding: 0.5rem 1rem 0.75rem;
}

#time-toggle.open {
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
}

#time-toggle {
    transition: border-radius 0.4s ease;
}

.time-option {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}

.time-option:active,
.time-option.active {
    background: rgba(255,255,255,0.15);
}

.pay-methods {
    margin-bottom: 1rem;
}

/* ── Card fields (expandable) ────────────────────── */
#pay-card.active {
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
}

.card-fields {
    max-height: 0;
    overflow: hidden;
    background: var(--navy);
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
    padding: 0 1rem;
    margin-top: -2px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.card-fields.visible {
    max-height: 300px;
    padding: 1rem;
}

.card-fields .field {
    border-color: var(--navy);
    color: var(--black);
    background: var(--white);
    font-size: 0.85rem;
}

.card-fields .field::placeholder {
    color: var(--dk);
}

.card-fields .field:focus {
    border-color: var(--navy);
}

.card-fields .row {
    gap: 0.75rem;
}

.card-fields .row div {
    flex: 1;
}
