/* Customer Panel – area styles (discord), 2026-10-12 redesign. Shared tokens and components live in app.css; the Bot-Inhalte overview,
   the editors and the Discord preview keep their own rules in discord-content.css.
   dx-*  Discord pages: guild cards, link panel, hub sections, ticket category list.
   Mobile-first: no fixed widths, nothing wider than the screen at 390 px, touch targets >= 40 px on touch screens and phones. */

.dx-area { min-width: 0; overflow-wrap: break-word; }
.dx-has-actionbar { padding-bottom: 72px; }   /* room for the sticky action bar */
.dx-section { margin-bottom: 16px; }
.dx-subhead { margin: 4px 0 8px; }
.dx-alert-row { justify-content: space-between; flex-wrap: wrap; align-items: center; }
.dx-area .bc-badge { text-transform: uppercase; }

/* ---------- Discord servers: one card per guild ---------- */
.dx-guilds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 16px; align-items: start; }
.dx-guild { margin-bottom: 0; min-width: 0; }
.dx-guild .cp-guild-head { flex-wrap: wrap; }
.dx-guild .cp-guild-title h2 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.dx-guild-actions { align-items: center; }

/* ---------- self-service link panel ---------- */
.dx-link { margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; border-color: var(--nx-accent-dim); }
.dx-link-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dx-link-head h2 { margin: 0; font-size: 1.1rem; }
.dx-link-server { max-width: 480px; margin-bottom: 0; }
.dx-link-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; color: var(--nx-text-dim); line-height: 1.5; }
.dx-link-steps li > strong { color: var(--nx-text); margin-right: 6px; }
.dx-link-steps li > .nx-btn { margin-top: 8px; display: flex; width: fit-content; }
.dx-link-command { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.dx-link-command .cp-code { margin-top: 0; }

/* ---------- player hub ---------- */
.dx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dx-chips li { padding: 4px 10px; border-radius: var(--nx-radius-pill); background: var(--nx-bg-hover); color: var(--nx-text); font-size: 0.84rem; font-family: var(--nx-mono); }
.dx-check { min-height: 32px; }
.dx-switch { margin: 4px 0 10px; }

/* ---------- ticket categories ---------- */
.dx-form { border-color: var(--nx-accent-dim); }
.dx-form .nx-switch { margin: 4px 0; }
.dx-cat-list { list-style: none; margin: 0; padding: 4px 20px; }
.dx-cat { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 14px 0; border-bottom: 1px solid var(--nx-border-soft); }
.dx-cat:last-child { border-bottom: 0; }
.dx-cat-off .dx-cat-name, .dx-cat-off .dx-cat-emoji { opacity: 0.6; }
.dx-cat-pos { min-width: 2.2em; font-variant-numeric: tabular-nums; color: var(--nx-text-faint); font-weight: 600; }
.dx-cat-emoji { font-size: 1.2rem; width: 1.6em; text-align: center; }
.dx-cat-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dx-cat-name { font-weight: 650; }
.dx-cat-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 0.82rem; }
.dx-cat-meta > div { display: flex; gap: 6px; min-width: 0; }
.dx-cat-meta dt { color: var(--nx-text-faint); font-weight: 400; }
.dx-cat-meta dt::after { content: ":"; }
.dx-cat-meta dd { margin: 0; color: var(--nx-text-dim); }
.dx-cat-note { color: var(--nx-text-faint); font-size: 0.78rem; }
.dx-cat-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.dx-row-actions { display: inline-flex; align-items: center; gap: 6px; }
.dx-cat-side .nx-menu-list { left: auto; right: 0; }   /* the menu opens towards the page, not past its right edge */

@media (max-width: 720px) {
    .dx-cat-list { padding: 4px 14px; }
    .dx-cat { grid-template-columns: auto auto minmax(0, 1fr); }
    .dx-cat-side { grid-column: 1 / -1; justify-content: space-between; }
    .dx-guild-actions > .nx-btn { flex: 1 1 calc(50% - 8px); }
}

/* Touch screens and phones: every control at least 40 px high (nx-btn-sm is 32 px on desktop). */
@media (pointer: coarse), (max-width: 720px) {
    .dx-area .nx-btn-sm, .dx-area .nx-menu-trigger, .dx-area .bc-chip, .dx-area .dc-remove,
    .dx-area .dc-lang-switch button, .dx-area .nx-menu-item { min-height: 40px; }
    .dx-area .bc-chip, .dx-area .dc-remove { display: inline-flex; align-items: center; }
    .dx-area .cp-check, .dx-area .dc-inline { min-height: 40px; }
    .dx-area .dc-section > summary { min-height: 44px; }
    .dx-area .nx-menu-trigger { min-width: 40px; }
}
