/* ═══════════════════════════════════════════════════════════════════════
   Internal drill sheet (FF-2546), reached from a school's team page.

   Retrospective entry, not the mobile app's live clock: these teams ran the
   drill with a stopwatch and the printed sheet, so the layout follows the paper
   top to bottom rather than trying to look like a timer.
   ═══════════════════════════════════════════════════════════════════════ */

.drill-form-page {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ─── Header ──────────────────────────────────────────────────────────── */

.drill-form-header {
    margin-bottom: 1.25rem;
}

.drill-form-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #5c6674);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.drill-form-back:hover { color: var(--primary, #9f2241); }

.drill-form-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #16202c);
}

.drill-form-subtitle {
    margin: 0.375rem 0 0;
    max-width: 44rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary, #5c6674);
}

/* ─── Card and sections ───────────────────────────────────────────────── */

.drill-form-card {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e3e7ec);
    border-radius: 14px;
    overflow: hidden;
}

.drill-form-section {
    padding: 1.5rem 1.75rem;
}

.drill-form-section + .drill-form-section {
    border-top: 1px solid var(--border, #e3e7ec);
}

.drill-form-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.drill-form-section-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary, #16202c);
}

.drill-form-section-sub {
    margin: 0.25rem 0 0;
    max-width: 40rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary, #5c6674);
}

.drill-form-section-title + .drill-form-grid,
.drill-form-section-sub + .drill-milestones,
.drill-form-section-sub + .drill-checklist,
.drill-form-section-sub + .drill-attendees,
.drill-form-section-sub + .drill-form-empty-inline {
    margin-top: 1rem;
}

.drill-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.drill-field + .drill-field { margin-top: 1rem; }

.drill-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #16202c);
}

.drill-req { color: var(--primary, #9f2241); }

/* ─── Empty states ───────────────────────────────────────────────────── */

.drill-form-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-secondary, #5c6674);
    font-size: 0.875rem;
}

.drill-form-empty p { margin: 0; max-width: 28rem; }

.drill-form-empty-hint {
    color: var(--text-tertiary, #8a94a3);
    font-size: 0.8125rem;
}

.drill-form-empty-inline {
    padding: 1rem;
    border: 1px dashed var(--border, #e3e7ec);
    border-radius: 10px;
    font-size: 0.8125rem;
    color: var(--text-secondary, #5c6674);
}

/* ─── Milestone times ────────────────────────────────────────────────── */

.drill-milestones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drill-elapsed {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

/* Narrow: two small boxes read as one time, where two full-width fields would
   read as two unrelated questions. */
.drill-elapsed-box {
    width: 4.5rem;
    flex: 0 0 auto;
}

.drill-elapsed-colon {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-tertiary, #8a94a3);
    padding-bottom: 0.25rem;
}

.drill-elapsed-unit {
    margin-left: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-tertiary, #8a94a3);
}

/* Live read-back of the three-minute goal, beside the shock time. */
.drill-goal-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.drill-goal-flag.met  { background: #ecfdf5; color: #047857; }
.drill-goal-flag.over { background: #fffbeb; color: #b45309; }

/* ─── Attendance ─────────────────────────────────────────────────────── */

.drill-attendee-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.drill-link-btn {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary, #9f2241);
    cursor: pointer;
}

.drill-link-btn:hover { text-decoration: underline; }

.drill-link-sep { color: var(--text-tertiary, #8a94a3); }

.drill-attendees {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.5rem;
}

.drill-attendee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border, #e3e7ec);
    border-radius: 10px;
    background: var(--card, #fff);
    text-align: left;
    cursor: pointer;
    color: var(--text-tertiary, #8a94a3);
}

.drill-attendee:hover { border-color: var(--primary, #9f2241); }

.drill-attendee.present {
    border-color: #10b981;
    background: #f0fdf4;
    color: #047857;
}

.drill-attendee-body {
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
}

.drill-attendee-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #16202c);
}

.drill-attendee-role {
    font-size: 0.6875rem;
    color: var(--text-tertiary, #8a94a3);
}

.drill-attendee-count {
    margin-top: 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #5c6674);
    font-variant-numeric: tabular-nums;
}

/* ─── Response checklist ─────────────────────────────────────────────── */

.drill-checklist {
    list-style: none;
    counter-reset: drill-item;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.drill-checklist-item {
    counter-increment: drill-item;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    align-items: start;
    padding: 0.875rem 0;
}

.drill-checklist-item + .drill-checklist-item {
    border-top: 1px solid #f1f5f9;
}

/* The printed sheet numbers these, and people fill it in with the paper beside
   them, so the numbers have to match. */
.drill-checklist-text::before {
    content: counter(drill-item) ". ";
    font-weight: 700;
    color: var(--text-tertiary, #8a94a3);
}

.drill-checklist-text {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-primary, #16202c);
}

.drill-checklist-detail {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary, #5c6674);
}

.drill-checklist-item .aed-error { grid-column: 1 / -1; }

.drill-yesno {
    display: flex;
    gap: 0.375rem;
}

.drill-yesno-btn {
    min-width: 3.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border, #e3e7ec);
    border-radius: 9999px;
    background: var(--card, #fff);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #5c6674);
    cursor: pointer;
}

.drill-yesno-btn:hover { border-color: var(--text-tertiary, #8a94a3); }

/* Yes and No are coloured differently on purpose: the checklist is scanned for
   the No answers, and a uniform selected state hides them. */
.drill-yesno-btn.yes.selected {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

.drill-yesno-btn.no.selected {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */

.drill-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 1.125rem 1.75rem;
    border-top: 1px solid var(--border, #e3e7ec);
    background: var(--surface, #f7f8fa);
}

/* ─── Narrow screens ─────────────────────────────────────────────────── */

@media (max-width: 700px) {
    .drill-form-section { padding: 1.25rem 1rem; }
    .drill-form-footer { padding: 1rem; }

    /* Stacked: the answer buttons need the full width beside a question that is
       already two lines long. */
    .drill-checklist-item { grid-template-columns: 1fr; }
    .drill-yesno { justify-content: flex-start; }

}
