/* Public pages (registration). Hand-written so the server needs no build step.
   --brand is set per organization in the layout. */

:root {
    --ink: #1c1917;
    --muted: #6b6560; /* 5.3:1 on the page background (WCAG AA) */
    --line: #e7e5e4;
    --bg: #f5f5f4;
    --card: #ffffff;
    --danger: #b91c1c;
    --ok: #15803d;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--card); border-bottom: 3px solid var(--brand); margin-bottom: 24px; }
.site-header-inner { padding-top: 14px; padding-bottom: 14px; }
.site-logo { max-height: 56px; max-width: 260px; display: block; }
.site-banner { max-width: 1000px; margin: 0 auto 24px; border-bottom: 3px solid var(--brand); }
.site-banner img { display: block; width: 100%; height: auto; }
.site-name { font-size: 1.3rem; font-weight: 700; color: var(--brand); }
.site-footer { color: var(--muted); font-size: 0.85rem; text-align: center; padding-top: 12px; padding-bottom: 40px; }

h1 { font-size: 1.7rem; margin: 0 0 4px; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h2 small { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.muted { color: var(--muted); font-size: 0.92rem; }
.rich p:first-child { margin-top: 0; }

.item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.item:first-of-type { border-top: 0; padding-top: 0; }
.item-grow { flex: 1; min-width: 0; }
.price { font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
.item input.qty { width: 80px; flex: 0 0 80px; text-align: center; }
.soldout { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.few-left { color: #b45309; font-size: 0.85rem; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
label.inline { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.95rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #8a8580; /* 3.6:1, so boxes can be seen (WCAG 1.4.11) */
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input:disabled, select:disabled { background: var(--bg); }
input[type=checkbox], input[type=radio] { margin-top: 4px; accent-color: var(--brand); }

.guest { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.guest-title { font-weight: 600; margin-bottom: 8px; }

.summary { width: 100%; border-collapse: collapse; }
.summary td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; white-space: nowrap; }
.total { text-align: right; font-size: 1.2rem; font-weight: 700; margin: 12px 0; }

.consent { background: var(--bg); border-radius: 8px; padding: 12px; margin: 16px 0; }

.error { color: var(--danger); font-size: 0.85rem; margin-top: 4px; }
.alert { border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }

.button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 14px 18px;
    font: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-text, #fff);
    background: var(--brand);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-link { display: inline-block; width: auto; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.paddle { font-size: 2rem; font-weight: 800; color: var(--brand); }
#payment-element { min-height: 40px; }

[x-cloak] { display: none !important; }

/* Accessibility (WCAG 2.1 AA). */
a, button, .button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, .button:focus-visible, input[type=checkbox]:focus-visible, input[type=radio]:focus-visible, input[type=file]:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 14px; border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 600; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.required-note { margin: 0 0 16px; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); }
