/* Shared page parts: the app pages (".app-page": admin, player and forum pages), lists, notes, flashes, tags, checkboxes. */

/* App pages — phone first */

.app-page h1 {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
}

.app-page h2 {
    font-size: 1.35rem;
    margin-top: 1.6rem;
}

.filter-tabs a {
    flex: none;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.filter-tabs a.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.filter-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.admin-tile {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem;
    border: 1px solid var(--rule);
    background: var(--paper-deep);
    color: var(--ink);
    text-decoration: none;
    border-radius: var(--radius);
}

.admin-tile.attention {
    border-color: var(--gold);
    box-shadow: inset 4px 0 0 var(--gold);
}

.tile-number {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1;
}

.admin-list,
.email-list,
.game-list,
.user-list,
.request-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.email-list li a,
.game-list li a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    text-decoration: none;
}

.email-preview,
.email-age,
.note {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.tag {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.flash {
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--gold);
    background: var(--paper-deep);
}

.empty {
    color: var(--ink-soft);
    font-style: italic;
}

.move-picker h3 {
    font-family: var(--sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    margin: 1rem 0 0.4rem;
}

.move-filter,
.search-form input {
    width: 100%;
    font: inherit;
    font-size: 1.05rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    background: var(--field);
}

.move-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.move-option,
.classify-group button {
    min-height: 48px;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    background: var(--field);
    color: var(--ink);
    font: 1rem var(--sans);
    text-align: left;
    cursor: pointer;
}

.move-option strong {
    font-family: var(--serif);
    font-size: 1.2rem;
    margin-right: 0.3rem;
}

.move-option span {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.move-option:hover,
.classify-group button:hover {
    border-color: var(--gold);
}

.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    min-height: 44px;
}

.check input {
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;  /* a long label wraps; the box keeps its size */
}

.classify-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.classify-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.classify-group button {
    flex: 1 1 140px;
    text-align: center;
}

.request-list li,
.user-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
}

.request-list .check {
    margin: 0;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--gold-ink);
    background: var(--gold-ink);
    color: var(--on-gold);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s, filter 0.15s;
}

.button:hover {
    filter: brightness(1.08);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.button:active {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.button.ghost {
    background: transparent;
    color: var(--gold-ink);
    box-shadow: none;
}

.button.ghost:hover {
    background: var(--gold-tint);
    filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .button, .button:hover { transition: none; transform: none; }
}

.button.small {
    padding: 0.5rem 0.9rem;
    min-height: 44px;
    font-size: 0.95rem;
    cursor: pointer;
}

.button.danger {
    color: var(--danger);
    border-color: var(--danger);
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    overflow-wrap: anywhere;
}

.facts dt {
    color: var(--ink-soft);
}

.facts dd {
    margin: 0;
}


/* Icons (Components/Shared/Icon.razor): line drawings in the text colour, sized to the text. */

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    vertical-align: -0.25em;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--rule);
    color: var(--gold-ink);
}

.icon-badge.large {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
}

.icon-badge.large .icon {
    width: 1.8rem;
    height: 1.8rem;
}

/* A list whose items start with an icon instead of a bullet. */
.icon-list {
    list-style: none;
    padding-left: 0;
}

.icon-list li {
    position: relative;
    padding-left: 1.9rem;
}

.icon-list li > .icon {
    position: absolute;
    left: 0;
    top: 0.2em;
    color: var(--gold-ink);
}

/* Signed-in player's home page: the game in progress as a card with its board. */
.current-game {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--rule);
    background: var(--paper-deep);
    color: var(--ink);
    text-decoration: none;
    border-radius: var(--radius);
}

.current-game.attention {
    border-color: var(--gold);
    box-shadow: inset 4px 0 0 var(--gold);
}

.current-game img {
    width: min(100%, 240px);
    height: auto;
}

.current-game-facts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.current-game-turn {
    font-family: var(--serif);
    font-size: 1.5rem;
}

/* The site's yes-or-no dialog (window.siteConfirm in js/site.js), in place of the browser's confirm(). */
.site-confirm {
    width: min(26rem, calc(100vw - 2rem));
    padding: 1.5rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow);
    overflow-x: hidden;   /* the buttons' hover lift would otherwise flash a scrollbar */
}

.site-confirm::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.site-confirm p {
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.site-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}
