/* base.css - shared by every page.
   Colours, sizes and fonts are custom properties here, so they're changed in one place
   (and so restaurants can later have their own colours). Mobile first. */

:root {
    /* Brand */
    --colour-slate: #2e3842;
    --colour-teal: #21b2a6;
    --colour-teal-dark: #1a8f85;
    --colour-purple: #505393;
    --colour-magenta: #e5097f;

    /* Page */
    --colour-background: #f4f6f7;
    --colour-surface: #ffffff;
    --colour-text: #24303a;
    --colour-text-muted: #5f6b75;
    --colour-border: #d9dee2;
    --colour-ok: #1d7a43;
    --colour-failed: #b3261e;

    /* Text. Open Sans will be self-hosted; until then the system font is used. */
    --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-size: 1rem;
    --letter-spacing-heading: 0.075em;

    /* Spacing and shapes */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2.5rem;
    --radius: 6px;
    --tap-size: 48px; /* minimum height for anything an owner taps */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    background: var(--colour-background);
    color: var(--colour-text);
    font-family: var(--font);
    font-size: var(--font-size);
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--colour-teal-dark);
}

h1,
h2,
h3 {
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-heading);
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 var(--space-3);
}

/* ---------- Top bar ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--colour-surface);
    border-bottom: 1px solid var(--colour-border);
}

.topbar-logo {
    display: flex;
}

/* ---------- Language switcher ---------- */

.lang-switcher {
    display: flex;
    gap: var(--space-1);
}

.lang-switcher a,
.lang-switcher-current {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-size);
    padding: 0 var(--space-3);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
}

.lang-switcher a {
    color: var(--colour-text);
}

.lang-switcher a:hover,
.lang-switcher a:focus-visible {
    background: var(--colour-background);
}

.lang-switcher-current {
    background: var(--colour-slate);
    color: #ffffff;
}

/* ---------- Page and panels ---------- */

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-3);
}

.panel {
    background: var(--colour-surface);
    border: 1px solid var(--colour-border);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-3);
}

.panel-center {
    text-align: center;
}

/* ---------- Buttons ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-size);
    padding: 0 var(--space-4);
    border: 0;
    border-radius: var(--radius);
    background: var(--colour-teal);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.button:focus-visible {
    background: var(--colour-teal-dark);
}

/* ---------- System check list (/health) ---------- */

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.check-list li {
    display: flex;
    gap: var(--space-3);
    align-items: baseline;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--colour-border);
}

.check-result {
    flex: 0 0 5.5rem;
    font-weight: 800;
}

.check-ok .check-result {
    color: var(--colour-ok);
}

.check-failed .check-result {
    color: var(--colour-failed);
}

/* ---------- Larger screens ---------- */

@media (min-width: 700px) {
    .page {
        padding: var(--space-5) var(--space-4);
    }

    .panel {
        padding: var(--space-5);
    }

    h1 {
        font-size: 2rem;
    }
}
