/*
 * Cookie Yoga — inner-app styles.
 *
 * Loaded by authenticated and utility pages on top of homepage.css.
 * Defines inner-app components only: forms, cards, booking flow, account
 * pages. Does not redefine base tokens, body, headings, or link styles
 * already provided by homepage.css.
 */

/* Variables homepage.css does not define */
:root {
    --error:         #9b2c2c;
    --error-bg:      #f4d9d5;
    --shadow-card:   0 2px 24px rgba(26, 18, 16, 0.06);
    --shadow-float:  0 8px 32px rgba(26, 18, 16, 0.08);
}

/* ------------------------------------------------------------------ */
/* Content wrapper                                                      */
/* ------------------------------------------------------------------ */

.public-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex: 1;
}

/* Inner pages need smaller headings than the homepage hero */
.public-main h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
.public-main h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.public-main h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
.public-main h1 em,
.public-main h2 em,
.public-main h3 em {
    color: var(--ink);
    font-style: normal;
}

/* ------------------------------------------------------------------ */
/* Buttons — inner pages use ink fill by default.                      */
/* .btn-primary and .btn-outline from homepage.css are NOT overridden. */
/* ------------------------------------------------------------------ */

.btn:not(.btn-primary):not(.btn-outline):not(.btn-cta-strip) {
    background: var(--ink);
    color: #fff;
}
.btn:not(.btn-primary):not(.btn-outline):not(.btn-cta-strip):hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--parchment);
}
.btn-ghost:hover {
    background: var(--bone);
    color: #000;
    transform: translateY(-1px);
}

/* ------------------------------------------------------------------ */
/* Intro block                                                          */
/* ------------------------------------------------------------------ */

.page-intro {
    margin-bottom: 3rem;
}
.page-intro p {
    color: var(--ink-muted);
    font-size: 1.15rem;
    max-width: 40rem;
}

/* ------------------------------------------------------------------ */
/* Generic white card                                                   */
/* ------------------------------------------------------------------ */

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 2rem 2.25rem;
}

/* ------------------------------------------------------------------ */
/* Button row                                                           */
/* ------------------------------------------------------------------ */

.btn-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--parchment);
}

/* ------------------------------------------------------------------ */
/* Flash messages                                                       */
/* ------------------------------------------------------------------ */

.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.flash-success { background: #e8f5e9; color: #2e7d32; }
.flash-error   { background: var(--error-bg); color: var(--error); }

/* ------------------------------------------------------------------ */
/* Status pills                                                         */
/* ------------------------------------------------------------------ */

.pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pill-active   { background: #e8f5e9; color: #2e7d32; }
.pill-pending  { background: #fff3e0; color: var(--ink); }
.pill-inactive { background: var(--bone); color: var(--ink-muted); }

/* ------------------------------------------------------------------ */
/* Auth pages (login / verify)                                          */
/* ------------------------------------------------------------------ */

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 2.5rem 2.25rem;
    max-width: 440px;
    width: 100%;
}

.auth-card h1 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.auth-card p {
    color: var(--ink-muted);
    margin-bottom: 1.5rem;
}

.auth-card form .form-row {
    margin-bottom: 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Form elements                                                        */
/* ------------------------------------------------------------------ */

.auth-card label,
.onboarding-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.auth-card input,
.onboarding-form input[type=text],
.onboarding-form input[type=email],
.onboarding-form input[type=tel],
.onboarding-form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--parchment);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--ink);
}

.auth-card input:focus,
.onboarding-form input:focus,
.onboarding-form select:focus,
.onboarding-form textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(26, 18, 16, 0.1);
}

.auth-card button,
.onboarding-form button {
    width: auto;
}

/* ------------------------------------------------------------------ */
/* Onboarding form                                                      */
/* ------------------------------------------------------------------ */

.onboarding {
    max-width: 720px;
}

.onboarding-form {
    background: #fff;
    padding: 2.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.onboarding-form h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--parchment);
}
.onboarding-form h3:first-of-type { margin-top: 0; }

.onboarding-form .form-row {
    margin-bottom: 1.25rem;
}

.onboarding-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.onboarding-form textarea {
    min-height: 5rem;
    resize: vertical;
    line-height: 1.6;
}

.onboarding-form .form-help {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--ink-faint);
}

.onboarding-form .radio-group,
.onboarding-form .checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.onboarding-form .radio-group label,
.onboarding-form .checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
}

.onboarding-form .radio-group input,
.onboarding-form .checkbox-group input {
    accent-color: var(--ink);
    width: 1.1rem;
    height: 1.1rem;
}

.onboarding-form .form-row.checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
}

.onboarding-form .btn-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--parchment);
}

/* ------------------------------------------------------------------ */
/* Phone field + custom dial picker                                     */
/* ------------------------------------------------------------------ */

.phone-field {
    display: flex;
    align-items: stretch;
}

.phone-field input[type=tel] {
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    flex: 1;
    border-left: none !important;
}

.dial-picker {
    position: relative;
    flex-shrink: 0;
}

.dial-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 0.75rem;
    background: var(--bone);
    border: 1px solid var(--parchment);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    height: 100%;
}

.dial-trigger:hover {
    background: var(--parchment);
}

.dial-trigger:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(26, 18, 16, 0.1);
    position: relative;
    z-index: 1;
}

.dial-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.dial-code {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 2.75rem;
}

.dial-chevron {
    color: var(--ink-muted);
    transition: transform 0.15s;
    flex-shrink: 0;
}

.dial-trigger[aria-expanded="true"] .dial-chevron {
    transform: rotate(180deg);
}

.dial-menu[hidden] { display: none; }

.dial-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--parchment);
    border-radius: var(--radius);
    box-shadow: var(--shadow-float);
    min-width: 220px;
    max-height: 260px;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.dial-option {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.dial-option:hover {
    background: var(--bone);
}

.dial-option.is-selected {
    background: var(--bone);
    font-weight: 700;
}

.dial-option-flag {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dial-option-name {
    flex: 1;
}

.dial-option-code {
    color: var(--ink-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/* Schedule preference pills                                            */
/* ------------------------------------------------------------------ */

.pref-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.pref-row + .pref-row {
    margin-top: 0.5rem;
}

.pref-tag {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1.5px solid var(--parchment);
    background: var(--bone);
    font-family: 'Karla', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
    user-select: none;
}

.pref-tag:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.pref-tag:has(input:checked) {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.pref-tag input[type=checkbox] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Custom checkbox (terms)                                              */
/* ------------------------------------------------------------------ */

.form-row.checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
}

.form-row.checkbox input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--parchment);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    margin-top: 0.15rem;
    transition: background 0.15s, border-color 0.15s;
}

.form-row.checkbox input[type=checkbox]:checked {
    background: var(--ink);
    border-color: var(--ink);
}

.form-row.checkbox input[type=checkbox]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.form-row.checkbox input[type=checkbox]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 18, 16, 0.1);
}

/* ------------------------------------------------------------------ */
/* Class detail, booking, confirm, cancel pages                         */
/* ------------------------------------------------------------------ */

.class-detail {
    max-width: 720px;
}

.class-detail .back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
}
.class-detail .back:hover { color: var(--ink); }

.class-detail .kicker {
    font-family: 'Karla', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.class-detail h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.class-detail .description {
    color: var(--ink-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.class-detail .facts {
    background: var(--bone);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.class-detail .facts .fact .label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.35rem;
}

.class-detail .facts .fact .value {
    font-family: 'Londrina Solid', Georgia, serif;
    font-size: 1.5rem;
    color: var(--ink);
    text-transform: uppercase;
    line-height: 1;
}

/* ------------------------------------------------------------------ */
/* Empty states                                                         */
/* ------------------------------------------------------------------ */

.empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bone);
    border-radius: var(--radius);
    color: var(--ink-muted);
}
.empty h2 {
    color: var(--ink-muted);
    margin-bottom: 0.75rem;
}

/* ------------------------------------------------------------------ */
/* My account page                                                      */
/* ------------------------------------------------------------------ */

.account-page {
    max-width: 900px;
}

.account-section {
    margin-bottom: 3rem;
}
.account-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Booking rows                                                         */
/* ------------------------------------------------------------------ */

.booking-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.booking-row {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem 1.75rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 640px) {
    .booking-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .booking-row-actions {
        justify-self: start;
    }
}

.booking-row.history {
    opacity: 0.7;
    padding: 1rem 1.5rem;
}

.booking-row.booking-row-pending_payment {
    border-left: 4px solid var(--ink);
}
.booking-row.booking-row-confirmed {
    border-left: 4px solid #2e7d32;
}

.booking-row-when {
    min-width: 100px;
    padding-right: 1.5rem;
    border-right: 1px solid var(--parchment);
}

@media (max-width: 640px) {
    .booking-row-when {
        border-right: none;
        padding-right: 0;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--parchment);
    }
}

.booking-row-when .day {
    font-family: 'Karla', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
}

.booking-row-when .time {
    font-family: 'Londrina Solid', Georgia, serif;
    font-size: 1.75rem;
    color: var(--ink);
    text-transform: uppercase;
    line-height: 1;
    margin-top: 0.25rem;
}

.booking-row-body .name {
    font-family: 'Karla', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.4rem;
    text-transform: none;
    letter-spacing: 0;
}

.booking-row-body .meta {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.booking-row-body .meta .subtle {
    color: var(--ink-faint);
}

.booking-row-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cancel-link {
    color: var(--ink-faint);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cancel-link:hover { color: var(--ink); }

/* ------------------------------------------------------------------ */
/* Package rows                                                         */
/* ------------------------------------------------------------------ */

.package-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.package-row {
    background: var(--bone);
    border-radius: var(--radius);
    padding: 1.4rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.package-row-main .name {
    font-family: 'Karla', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.35rem;
    text-transform: none;
    letter-spacing: 0;
}

.package-row-main .meta {
    font-size: 0.9rem;
    color: var(--ink-muted);
}

/* ------------------------------------------------------------------ */
/* Account profile details                                              */
/* ------------------------------------------------------------------ */

.account-details {
    margin-top: 3rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-card);
}

.account-details summary {
    cursor: pointer;
    font-family: 'Karla', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    list-style: none;
    position: relative;
    padding-right: 1.5rem;
}
.account-details summary::-webkit-details-marker { display: none; }
.account-details summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.25rem;
    color: var(--ink);
}
.account-details[open] summary::after { content: "−"; }
.account-details[open] summary { margin-bottom: 1rem; }

.account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.account-card {
    background: var(--bone);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.account-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--parchment);
}

/* ------------------------------------------------------------------ */
/* Key-value grid                                                       */
/* ------------------------------------------------------------------ */

.kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem 1.25rem;
    margin: 0;
}
.kv dt {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    align-self: start;
    padding-top: 0.15rem;
}
.kv dd { margin: 0; color: var(--ink); }

/* ------------------------------------------------------------------ */
/* Tag list                                                             */
/* ------------------------------------------------------------------ */

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.tag-list li {
    background: var(--bone);
    color: var(--ink-muted);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Miscellaneous                                                        */
/* ------------------------------------------------------------------ */

.subtle    { color: var(--ink-muted); }
.small-note { font-size: 0.85rem; color: var(--ink-faint); }
