/* This app's own styles. The look comes from theme.css and foundation.css; page-specific styles live here. */

/* Messages ---------------------------------------------------------------------------- */
.notice {
    margin-block: var(--space-m, 1.5rem) 0;
    padding: var(--space-s, 1rem);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.notice--error {
    border-left-color: #d92d20;
}

/* The soft wave line: it divides sections and runs under today's classes ---------------- */
.wave {
    width: min(100%, 14rem);
    height: 0.75rem;
    background-color: var(--color-pop);
    -webkit-mask: url('../images/wave.svg') repeat-x left center / 3.5rem 0.75rem;
    mask: url('../images/wave.svg') repeat-x left center / 3.5rem 0.75rem;
}

.wave--full {
    width: 100%;
}

/* Header ------------------------------------------------------------------------------- */
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs) var(--space-m);
}

.logo {
    order: 1;
    margin-right: auto;
}

.lang-switch {
    order: 2;
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 999px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.lang-switch button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-weight: 700;
    font-size: var(--step--1);
    letter-spacing: 0.06em;
    cursor: pointer;
}

.lang-switch button[aria-current='true'] {
    background: var(--color-accent);
    color: var(--color-accent-text);
}

.lang-switch button:not([aria-current='true']):hover {
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}

.site-nav {
    order: 3;
    width: 100%;
}

.nav__list {
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
}

.nav__list li {
    flex: none;
}

@media (min-width: 64rem) {
    .site-nav {
        order: 2;
        width: auto;
        margin-left: auto;
    }

    .lang-switch {
        order: 3;
    }

    .logo {
        margin-right: 0;
    }
}

.button--small {
    min-height: 44px;
    padding: 0.5em 1em;
    font-size: var(--step--1);
}

.nav__list .button {
    display: inline-flex;
    align-items: center;
}

.nav__list .button:hover {
    text-decoration: none;
}

.logo img {
    border-radius: 9px;
}

.site-footer a {
    font-weight: 600;
}

/* Home page ---------------------------------------------------------------------------- */
.hero {
    padding-block: var(--space-xl) var(--space-2xl);
}

.hero .display {
    font-size: var(--step-5);
    line-height: 1.02;
}

@media (min-width: 56rem) {
    .hero .display {
        font-size: var(--step-6);
    }
}

.hero__art img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.steps {
    list-style: none;
    padding: 0;
}

.step__number {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--color-pop);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--step-1);
}

h2.h3 {
    font-size: var(--step-2);
}

/* Staff pages -------------------------------------------------------------------------- */
.subnav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    padding: 0;
    list-style: none;
}

.subnav a {
    display: inline-block;
    padding: 0.55em 1.1em;
    border-radius: 999px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
    text-decoration: none;
}

.subnav a[aria-current='page'] {
    background: var(--color-accent);
    color: var(--color-accent-text);
}

fieldset {
    min-width: 0;
    border: 0;
}

/* The legend sits inside the card, above the fields. */
.h3-legend + * {
    clear: both;
}

.subnav:has(li:only-child) {
    display: none;
}

.h3-legend {
    float: left;
    width: 100%;
    padding: 0;
    margin-bottom: var(--space-s);
    font-family: var(--font-heading);
    font-size: var(--step-2);
    line-height: 1.15;
}

.tag--ok {
    background: color-mix(in srgb, var(--color-accent) 14%, white);
    color: var(--color-accent);
}

.tag--warn {
    background: #fde8d7;
    color: #8a3a05;
}

.tag--muted {
    background: color-mix(in srgb, var(--color-muted) 14%, white);
    color: var(--color-muted);
}

/* Tables: a real table on wide screens, stacked cards on phones. */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table th,
.table td {
    padding: var(--space-xs) var(--space-s);
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
}

.table thead th {
    background: color-mix(in srgb, var(--color-accent) 8%, white);
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.table__actions {
    text-align: right !important;
}

@media (max-width: 47.99rem) {
    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .table tr {
        padding: var(--space-xs) 0;
        border-bottom: 1px solid color-mix(in srgb, var(--color-text) 14%, transparent);
    }

    .table tbody tr:last-child {
        border-bottom: 0;
    }

    .table td {
        display: flex;
        justify-content: space-between;
        gap: var(--space-s);
        padding: var(--space-3xs) var(--space-s);
        border: 0;
        text-align: right;
    }

    .table td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: var(--color-muted);
    }

    .table__actions {
        justify-content: flex-end;
    }
}

.pager {
    display: flex;
    justify-content: space-between;
    gap: var(--space-s);
}

/* Timetable ---------------------------------------------------------------------------- */
.timetable__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-m);
    margin-bottom: var(--space-s);
}

.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    list-style: none;
    border-radius: 999px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.section--surface .segmented {
    background: var(--color-bg);
    box-shadow: none;
}

.segmented a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.2em;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.segmented a[aria-current='page'] {
    background: var(--color-accent);
    color: var(--color-accent-text);
}

.day-tabs {
    margin-bottom: var(--space-m);
}

.day-tabs ul {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: var(--space-3xs);
    padding: 0;
    list-style: none;
}

.day-tabs a {
    display: grid;
    justify-items: center;
    padding: 0.5rem 0.1rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    line-height: 1.15;
}

.section--surface .day-tabs a {
    background: var(--color-bg);
    box-shadow: none;
}

.day-tab__name {
    font-size: var(--step--1);
    font-weight: 700;
    color: var(--color-muted);
    text-transform: capitalize;
}

.day-tab__num {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--step-2);
}

.day-tabs a.day-tab--today .day-tab__num {
    text-decoration: underline;
    text-decoration-color: var(--color-pop);
    text-decoration-thickness: 0.14em;
    text-underline-offset: 0.12em;
}

.day-tabs a[aria-current='true'] {
    background: var(--color-accent);
    color: var(--color-accent-text);
    box-shadow: var(--shadow);
}

.day-tabs a[aria-current='true'] .day-tab__name {
    color: inherit;
}

/* Only when the script is running do the tabs hide the other days. */
.timetable:not(.is-tabbed) .day-tabs a {
    background: var(--color-surface);
}

.day-panel__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
    font-size: var(--step-2);
}

.day-panel__title .tag {
    font-family: var(--font-body);
    font-size: var(--step--1);
}

.class-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-xs) var(--space-s);
    align-content: start;
}

.section--surface .class-card {
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
}

.class-card__time {
    display: grid;
    align-content: start;
    justify-items: start;
    min-width: 4.5rem;
    line-height: 1.2;
}

.class-card__start {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--step-2);
    font-variant-numeric: tabular-nums;
}

.class-card__who {
    font-weight: 600;
}

.class-card__desc {
    font-size: var(--step--1);
    color: var(--color-muted);
}

.class-card__foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
}

.class-card--off h4 {
    text-decoration: line-through;
}

.places {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 700;
    font-size: var(--step--1);
}

.places::before {
    content: '';
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    background: var(--color-accent);
}

.places--few::before {
    background: var(--color-pop);
}

.places--none::before {
    background: #d92d20;
}

/* Plans -------------------------------------------------------------------------------- */
.plan {
    display: grid;
    align-content: space-between;
    gap: var(--space-5, 1.5rem);
}

.plan__action .button {
    justify-self: start;
}

.plan--featured {
    outline: 3px solid var(--color-accent);
    outline-offset: -3px;
}

.plan__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5em;
}

.plan .big-number {
    font-size: var(--step-4);
}

/* A turned-off button, such as "Full". */
.button:disabled {
    background: color-mix(in srgb, var(--color-muted) 18%, white);
    color: var(--color-muted);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* My bookings -------------------------------------------------------------------------- */
.booking-list {
    display: grid;
    gap: var(--space-s);
    padding: 0;
    list-style: none;
}

.booking {
    display: grid;
    gap: var(--space-xs) var(--space-m);
    align-items: start;
}

.booking__when {
    display: grid;
    line-height: 1.25;
}

.booking__name {
    font-size: var(--step-1);
}

.booking--off .booking__name {
    text-decoration: line-through;
}

@media (min-width: 40rem) {
    .booking {
        grid-template-columns: 9rem 1fr auto;
        align-items: center;
    }

    .booking__action {
        grid-column: auto;
    }
}

.table__actions .button + .button {
    margin-left: var(--space-3xs);
}

/* About, contact and the hours strip ---------------------------------------------------- */
.address {
    font-style: normal;
    line-height: 1.7;
}

.hours {
    max-width: 28rem;
}

.hours-strip .wave {
    background-color: var(--color-pop);
}

.hours-strip .button {
    background: var(--color-bg);
    color: var(--color-text);
}

h2.h3,
.hours-strip h2 {
    font-size: var(--step-2);
}

.about__intro {
    align-items: start;
}

.message-list {
    display: grid;
    gap: var(--space-s);
    padding: 0;
    list-style: none;
}

.message__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3xs) var(--space-m);
}

.message__body {
    white-space: pre-line;
}

.footer-links a {
    font-weight: 600;
}
