/* account-settings.css: Account settings rail (acct-settings-*) and support tickets. */
/* ===== ACCOUNT SETTINGS RAIL (acct-settings-*) =====
   Settings used to be one unbroken scroll (11 sections) with a static, incomplete anchor
   jumpbar (three sections had no link at all) and no memory of where you were. This
   mirrors the staff Site Settings console's proven rail/group layout
   (.staff-settings-layout) rather than inventing a second one, but stays its own
   namespace: the staff version carries a live filter, dirty-tracking and a high-risk
   confirmation dialog that a player's own preferences never need, and sharing those class
   names would read as "this page is staff-gated" to a future editor. The one thing that
   IS copied exactly is the <=1024px fix the staff console needed: the rail collapses to a
   flat, non-nested flex row of pill buttons, never a nested grid inside it, or a
   single-item group stretches to match its tallest sibling and renders as a giant
   near-empty capsule (see the note above .staff-settings-layout). With JavaScript absent,
   x-show never runs, so every group renders unhidden in one page and the rail's real
   <a href="#settings-group-slug"> anchors still work as plain scroll jumps. */
.acct-settings-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    max-width: 980px;
    margin: 0 auto;
}
.acct-settings-rail {
    position: sticky;
    top: calc(var(--header-height) + 14px);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.acct-settings-rail__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.86rem;
    text-decoration: none;
}
@media (hover: hover) {
    .acct-settings-rail__item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
}
.acct-settings-rail__item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.acct-settings-rail__icon { flex: 0 0 auto; font-size: 1.05rem; line-height: 1; }
.acct-settings-rail__item.is-active {
    background: var(--bg-subtle);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--color-primary);
}
.acct-settings-sections { display: grid; gap: 20px; min-width: 0; }
.acct-settings-group { display: grid; gap: 20px; scroll-margin-top: calc(var(--header-height) + 16px); }
.acct-settings-group__intro { margin: 0 0 -8px; color: var(--text-secondary); font-size: 0.86rem; }

@media (max-width: 1024px) {
    .acct-settings-layout { grid-template-columns: minmax(0, 1fr); }
    .acct-settings-rail {
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 6px;
    }
    .acct-settings-rail__item {
        flex: 0 0 auto;
        min-height: 44px;
        white-space: nowrap;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-pill);
        background: var(--bg-surface);
    }
    .acct-settings-rail__item.is-active { border-color: var(--color-primary); box-shadow: none; }
}

/* Support tickets (tickets app): the player thread, the staff console's action row,
 * and the account-settings Activity table. One contiguous block, tokens only. */
.ticket-thread__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.ticket-reply {
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.ticket-reply--staff { background: color-mix(in srgb, var(--color-primary) 8%, var(--bg-surface)); border-color: color-mix(in srgb, var(--color-primary) 30%, var(--border-subtle)); }
.ticket-reply__meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.ticket-reply__body { overflow-wrap: anywhere; }
.ticket-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.ticket-action-row form { display: flex; align-items: center; gap: 6px; }

.account-activity-table td, .account-activity-table th { vertical-align: top; }
.account-activity-table .cell-wrap { max-width: 480px; }

