/*
 * Repent! Ye Foolish Gods: the warrior-card pieces the sept wizard and the post-game flow share (B-071, B-072).
 *
 * The labelled fields, the styled select, the gear picker, the drawers and the spell list used to be scoped to
 * the wizard (SeptWizard.razor.css). The post-game flow's recruit card and steps use the same pieces, so the rules
 * live here, global but limited to the two pages' roots; the play page also uses the field and the select (D-146).
 * Page layout stays in each page's own scoped CSS.
 */

:is(.wizard, .post-game, .play) .wizard-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

:is(.wizard, .post-game, .play) .wizard-select {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.375rem 0.5rem;
    background: var(--sc-raised);
    color: var(--sc-ink);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    font: inherit;
}

:is(.wizard, .post-game) .choice-meta {
    color: var(--sc-accent-text);
    font-weight: 700;
}

:is(.wizard, .post-game) .choice-text {
    grid-column: 1 / -1;
    color: var(--sc-ink-dim);
    font-size: var(--sc-text-small);
}

:is(.wizard, .post-game) .stat-bonus {
    text-align: center;
    color: var(--sc-accent-text);
    font-weight: 700;
}

:is(.wizard, .post-game) .gear-picker {
    border: 1px solid var(--sc-border);
    padding: 0.5rem 0.75rem;
}

:is(.wizard, .post-game) .gear-title {
    font-weight: 700;
}

/* What is equipped, readable with the list closed. */
:is(.wizard, .post-game) .gear-equipped {
    display: grid;
    gap: 0.25rem;
    margin: 0.25rem 0 0.5rem;
    padding-left: 0;
    list-style: none;
}

:is(.wizard, .post-game) .gear-equipped .choice-text {
    display: block;
}

:is(.wizard, .post-game) .gear-group-title {
    margin-top: 0.5rem;
    padding-bottom: 0.125rem;
    color: var(--sc-accent-text);
    font-family: var(--sc-font-head);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8125rem;
}

:is(.wizard, .post-game) .gear-row.single {
    grid-template-columns: minmax(0, 1fr) 5rem;
}

/* Every drawer's header is a full-width bar at least 44px tall with a big arrow on the right (pointing down
   when closed, up when open), so it is easy to hit on a phone. */
:is(.wizard, .post-game) .gear-picker summary,
:is(.wizard, .post-game) .warrior-drawer summary,
:is(.wizard, .post-game) .sept-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
}

:is(.wizard, .post-game) .gear-picker summary::-webkit-details-marker,
:is(.wizard, .post-game) .warrior-drawer summary::-webkit-details-marker,
:is(.wizard, .post-game) .sept-details summary::-webkit-details-marker {
    display: none;
}

:is(.wizard, .post-game) .gear-picker summary::after,
:is(.wizard, .post-game) .warrior-drawer summary::after,
:is(.wizard, .post-game) .sept-details summary::after {
    content: "▾";
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--sc-border);
    background: var(--sc-surface);
    color: var(--sc-accent-text);
    font-size: 1.5rem;
    line-height: 1;
}

:is(.wizard, .post-game) .gear-picker details[open] > summary::after,
:is(.wizard, .post-game) .warrior-drawer[open] > summary::after,
:is(.wizard, .post-game) .sept-details[open] > summary::after {
    content: "▴";
}

:is(.wizard, .post-game) .gear-picker summary:focus-visible,
:is(.wizard, .post-game) .warrior-drawer summary:focus-visible,
:is(.wizard, .post-game) .sept-details summary:focus-visible {
    outline: 2px solid var(--sc-accent-text);
    outline-offset: 2px;
}

:is(.wizard, .post-game) .gear-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.25rem 1.5rem 2.25rem;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--sc-border);
}

:is(.wizard, .post-game) .gear-row .rz-button {
    width: 100%;
    min-width: 0;
    padding-inline: 0;
}

:is(.wizard, .post-game) .gear-info .choice-text {
    display: block;
}

:is(.wizard, .post-game) .plain-list {
    margin: 0;
    padding-left: 1.25rem;
}

/* A warrior's reading (type details, spell list) sits in a closed drawer so the card stays short. */
:is(.wizard, .post-game) .warrior-drawer {
    border: 1px solid var(--sc-border);
    background: var(--sc-raised);
    padding: 0.5rem 0.75rem;
}

:is(.wizard, .post-game) .warrior-drawer summary {
    cursor: pointer;
    font-weight: 700;
}

:is(.wizard, .post-game) .drawer-body {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

:is(.wizard, .post-game) .spell-summary {
    display: grid;
    gap: 0.125rem;
}

:is(.wizard, .post-game) .spell-summary .choice-text {
    grid-column: auto;
}

:is(.wizard, .post-game) .spell-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

:is(.wizard, .post-game) .spell-option .choice-text {
    display: block;
}

:is(.wizard, .post-game) .sept-details {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--sc-border);
    background: var(--sc-surface);
}

:is(.wizard, .post-game) .sept-details summary {
    cursor: pointer;
    font-weight: 700;
}

:is(.wizard, .post-game) .sept-details .plain-list {
    max-height: 22vh;
    overflow-y: auto;
    margin-top: 0.5rem;
}

/* A Radzen checkbox with its label beside it, a 44px-tall row so it is easy to hit on a phone. */
:is(.wizard, .post-game) .check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
}

:is(.wizard, .post-game) .check-row .rz-label {
    margin: 0;
    cursor: pointer;
}

/* A label for a group of fields that has no single input of its own. */
:is(.wizard, .post-game) .field-heading {
    font-weight: 700;
}

/* Counts and dice: short boxes, not full width. */
:is(.wizard, .post-game) .number-box {
    width: 100%;
    max-width: 8rem;
}

/* The spell summary and its drawer (SpellChecklist), stacked like the wizard's warrior card. */
:is(.wizard, .post-game) .spell-checklist {
    display: grid;
    gap: 0.5rem;
}
