/* Public meet pages (/meet/{team}/…): shared card layout, form, and state
   styles. Tokens come from style.css + tokens.css (load both before this).
   Greys, blues, status colors, and focus rings were previously hardcoded and
   have been mapped onto the token spine (killed the stale #3a7db8 hover and the
   pre-Pool rgba(72,152,212,…) focus glow). */

body {
    background-color: var(--paper-2);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 1rem 2rem;
}
.meet-card {
    background: var(--paper);
    border-radius: 1rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    max-width: 560px;
    width: 100%;
    padding: 2.5rem 2rem;
}
.meet-card h1 {
    font-size: 1.5rem;
    margin: 0 0 0.25rem 0;
    text-align: center;
}
.meet-card .subtitle {
    color: var(--ink-3);
    font-size: 0.95rem;
    margin: 0.5rem 0 1.75rem 0;
    line-height: 1.4;
    text-align: center;
}

/* ---- Form fields (register) ---- */
.meet-card .form-field {
    margin-bottom: 1rem;
}
.meet-card .form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--ink-2);
}
.meet-card .form-field label .optional,
.meet-card fieldset legend .optional {
    font-weight: normal;
    color: var(--ink-4);
}
.meet-card .form-field input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--rule-strong);
    border-radius: 0.5rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.meet-card .form-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--ring);
}
.meet-card .field-note {
    font-size: 0.8rem;
    color: var(--ink-4);
    margin: 0.35rem 0 0 0;
}
.meet-card fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}
.meet-card fieldset legend {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-2);
    padding: 0;
    margin-bottom: 0.5rem;
}
.category-options {
    display: flex;
    gap: 1.5rem;
}
.category-options label,
.event-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--ink-2);
    cursor: pointer;
}
/* Sized for the checkboxes/radios themselves — scoped by type so the seed-time
   text inputs that now live inside .event-list aren't squashed to 1.15rem. */
.category-options input[type="radio"],
.category-options input[type="checkbox"],
.event-list input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--accent);
    cursor: pointer;
}
.event-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.consent-note {
    font-size: 0.8rem;
    color: var(--ink-4);
    line-height: 1.4;
    margin: 1.25rem 0 0 0;
}

/* ---- Buttons ---- */
/* Public primary CTA — full-width, Pool accent (intentional: public = inviting,
   deck = ink). Aligned to the primitive's radius/weight/hover token. */
.meet-btn {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--accent);
    border: none;
    border-radius: var(--r-btn);
    cursor: pointer;
    transition: background-color 0.15s;
    margin-top: 1rem;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.meet-btn:hover {
    background-color: var(--accent-ink);
    color: #fff;
}

/* ---- Alerts & states ---- */
.meet-error {
    background: var(--bad-soft);
    color: var(--bad);
    border: 1px solid var(--bad-soft);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.meet-saved {
    background: var(--good-soft);
    color: var(--good);
    border: 1px solid var(--good-soft);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.meet-success {
    padding: 1rem 0;
    text-align: center;
}
.meet-success .checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--good-soft);
    margin-bottom: 1rem;
}
/* The chip owns the icon color so the SVG can stay currentColor — it used to
   hardcode a pre-token green that wasn't --good. */
.meet-success .checkmark svg {
    width: 28px;
    height: 28px;
    color: var(--good);
}
.meet-success h2 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    color: var(--ink-2);
}
.meet-success p {
    color: var(--ink-2);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}
.meet-success .email-highlight {
    font-weight: 600;
    color: var(--ink);
}
.meet-closed,
.withdrawn-state {
    text-align: center;
    padding: 1rem 0;
    color: var(--ink-2);
    font-size: 0.95rem;
    line-height: 1.5;
}
.withdrawn-state a {
    color: var(--accent);
}
.meet-closed-note {
    font-size: 0.85rem;
    color: var(--ink-4);
    text-align: center;
    margin-bottom: 1rem;
}

/* ---- Manage page details ---- */
.signup-details {
    background: var(--paper-2);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.signup-details dt {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-4);
    margin-top: 0.6rem;
}
.signup-details dt:first-child {
    margin-top: 0;
}
.signup-details dd {
    margin: 0;
    color: var(--ink-2);
}
.signup-details p {
    font-size: 0.8rem;
    color: var(--ink-4);
    margin: 0.75rem 0 0 0;
    line-height: 1.4;
}
.withdraw-row {
    text-align: center;
    margin-top: 1.5rem;
}
.withdraw-btn {
    background: none;
    border: none;
    color: var(--bad);
    font-family: inherit;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

/* ---- Meet home: event catalog (read-only) ---- */
.event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1rem;
}
.event-grid span {
    font-size: 0.95rem;
    color: var(--ink-2);
}
.event-day {
    font-size: 0.8rem;
    color: var(--ink-4);
    white-space: nowrap;
}
.meet-section {
    margin-top: 1.75rem;
}
.meet-section h2 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-2);
    margin: 0 0 0.5rem 0;
}
.meet-section h2 .optional {
    font-weight: normal;
    color: var(--ink-4);
}

/* ---- Meets index: list rows ---- */
.meet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.meet-list li {
    border-top: 1px solid var(--rule);
}
.meet-list li:first-child {
    border-top: none;
}
.meet-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0.25rem;
    text-decoration: none;
    color: var(--ink-2);
}
.meet-list a:hover .meet-list-name {
    color: var(--accent);
}
.meet-list-name {
    font-weight: 600;
}
.meet-list-date {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-4);
    font-weight: normal;
    margin-top: 0.15rem;
}
.status-chip {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    padding: 0.25rem 0.7rem;
    white-space: nowrap;
}
.status-chip.open {
    background: var(--good-soft);
    color: var(--good);
}
.status-chip.closed {
    background: var(--paper-3);
    color: var(--ink-3);
}

@media (max-width: 480px) {
    .event-list,
    .event-grid {
        grid-template-columns: 1fr;
    }
}

.footer {
    margin-top: 2rem;
    text-align: center;
}

/* ============================================================
   Per-event seed time + course control (register · manage)
   ============================================================ */
.meet-card .seed-explainer { margin: -0.25rem 0 1.25rem 0; }
.event-list .event-item { min-width: 0; }
.seed-fields { margin: 0.5rem 0 0.35rem 1.65rem; }
.seed-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.35rem; }
.seed-label .optional { font-weight: 400; color: var(--ink-4); }
.seed-fields .seed-time { width: 100%; max-width: 13rem; height: auto; padding: 0.6rem 0.75rem; font-family: inherit; font-size: 1rem; border: 1px solid var(--rule-strong); border-radius: 0.5rem; box-sizing: border-box; transition: border-color 0.15s; }
.seed-fields .seed-time:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.seed-hint { font-size: 0.75rem; color: var(--ink-4); margin: 0.25rem 0 0 0; }
/* Course segmented control — radios styled as buttons. Always visible with the
   meet's course preselected, so the common case needs no thought and an
   off-course time is one tap away. */
.seed-course { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.seed-course label {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 3.75rem; padding: 0.45rem 0.65rem; font-family: inherit; font-size: 0.85rem; font-weight: 600;
    color: var(--ink-2); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 0.5rem;
    cursor: pointer; transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.seed-course label:hover { border-color: var(--ink-4); }
.seed-course input { position: absolute; opacity: 0; width: 0; height: 0; }
/* .sel is set by JS; :has() covers the no-JS path */
.seed-course label.sel,
.seed-course label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seed-course label:has(input:focus-visible) { box-shadow: var(--ring); }
