/* Customer Panel › Discord › Bot-Inhalte — layout v4 (2026-10-05).
   Linked GLOBALLY in App.razor (HeadOutlet is not interactive: a page-level <HeadContent> stylesheet never loads after navigation).
   bc-*  overview: toolbar, filters, categories, card grid (3 / 2 / 1 columns), badges, empty states, preview dialog, embed type picker.
   nx-menu-*  the ⋯ action menu (Shared/ActionMenu.razor).
   dmp-*  the Discord-like message preview (Shared/DiscordMessagePreview.razor).
   dc-*  the editors: form left, sticky preview right, folding sections, sticky action bar.
   Nothing may cause horizontal scrolling: every grid column is minmax(0, …), long words wrap. */

.nx-content:has(.bc-page), .nx-content:has(.dc-page) { max-width: 1440px; }
.bc-page, .dc-page { min-width: 0; overflow-wrap: break-word; }
.bc-page h3, .dc-page h3 { text-transform: none; letter-spacing: 0; color: var(--nx-text); }   /* app.css styles h3 as an uppercase label */
.dc-page { padding-bottom: 72px; }   /* room for the sticky action bar */

/* ---------- header + server toolbar ---------- */
.bc-head { margin-bottom: 18px; }
.bc-head h1 { margin: 2px 0 0; }
.bc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
    padding: 14px 18px; background: var(--nx-bg-card); border: 1px solid var(--nx-border-soft); border-radius: var(--nx-radius); }
.bc-guild { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
.bc-guild-icon { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; flex: 0 0 48px; background: var(--nx-bg-hover); }
.bc-guild-icon-empty { display: grid; place-items: center; color: var(--nx-accent); font-size: 1.3rem; }
.bc-guild-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.bc-guild-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-text-faint); font-weight: 600; }
.bc-guild-name { font-weight: 700; font-size: 1.05rem; }
.bc-guild-select { max-width: 420px !important; width: 100%; }
.bc-guild-status { font-size: 0.82rem; font-weight: 600; }
.bc-guild-status-ok { color: var(--nx-success); }
.bc-guild-status-warn { color: var(--nx-warning); }
.bc-guild-status-off { color: var(--nx-danger); }
.bc-guild-status-unknown { color: var(--nx-text-dim); }
.bc-toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- search + filter chips ---------- */
.bc-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bc-search { flex: 0 1 300px; min-width: 0; max-width: none !important; }
.bc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bc-chip { font: inherit; font-size: 0.82rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--nx-border); background: transparent;
    color: var(--nx-text-dim); cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.bc-chip:hover { background: var(--nx-bg-hover); color: var(--nx-text); }
.bc-chip.active { background: rgba(90, 209, 255, .14); border-color: rgba(90, 209, 255, .5); color: var(--nx-text); }

/* ---------- categories + card grid ---------- */
.bc-category { margin-top: 26px; }
.bc-category-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bc-category-head h2 { margin: 0; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--nx-text); font-weight: 750; }
.bc-category-head p { margin: 4px 0 0; color: var(--nx-text-dim); font-size: 0.86rem; }
.bc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.bc-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; background: var(--nx-bg-card);
    border: 1px solid var(--nx-border-soft); border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.bc-card:hover, .bc-card:focus-within { border-color: var(--nx-accent-dim); box-shadow: 0 6px 22px -14px rgba(0, 0, 0, .9); }
.bc-card-top { display: flex; align-items: flex-start; gap: 12px; }
.bc-card-icon { --bc-accent: var(--nx-accent); flex: 0 0 42px; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.25rem;
    background: color-mix(in srgb, var(--bc-accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-accent) 35%, transparent); }
.bc-card-title { min-width: 0; flex: 1; }
.bc-card-title h3 { margin: 0 0 7px; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.bc-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bc-badge { font-size: 0.64rem; font-weight: 750; letter-spacing: .07em; padding: 2px 7px; border-radius: 5px; white-space: nowrap; vertical-align: middle; }
.bc-badge-system { background: rgba(147, 164, 186, .16); color: #C3CFDD; }
.bc-badge-custom { background: rgba(167, 139, 250, .18); color: #C4B5FD; }
.bc-badge-customized { background: rgba(90, 209, 255, .14); color: var(--nx-accent); }
/* 2026-10-16: "PL fehlt" — German changed without Polish (Polish guild only) */
.bc-badge-missing-pl { background: rgba(245, 158, 11, .16); color: #FCD34D; }


.bc-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0; padding: 10px 12px; border-radius: 9px; background: rgba(0, 0, 0, .16); }
.bc-meta dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-text-faint); font-weight: 600; margin-bottom: 2px; }
.bc-meta dd { margin: 0; font-size: 0.84rem; min-width: 0; }
.bc-channel { color: var(--nx-text); font-weight: 600; }
.bc-warn { color: #FCA5A5; font-weight: 600; }
.bc-muted { color: var(--nx-text-faint); }

.bc-summary { margin: 0; font-size: 0.86rem; color: var(--nx-text-dim); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-hint { margin: 0; font-size: 0.8rem; color: var(--nx-text-faint); line-height: 1.4; }
.bc-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.bc-actions .nx-btn, .bc-toolbar-actions .nx-btn { white-space: nowrap; }
.bc-actions .bc-edit { margin-left: auto; }

/* ---------- empty states ---------- */
.bc-empty { text-align: center; padding: 44px 20px; background: var(--nx-bg-card); border: 1px dashed var(--nx-border); border-radius: 12px; }
.bc-empty-inline { padding: 32px 20px; }
.bc-empty-icon { font-size: 2rem; margin-bottom: 8px; }
.bc-empty h2, .bc-empty h3 { margin: 0 0 6px; font-size: 1.05rem; }
.bc-empty p { margin: 0 auto 16px; color: var(--nx-text-dim); max-width: 460px; }

/* ---------- ⋯ action menu ---------- */
.nx-menu { position: relative; display: inline-flex; }
.nx-menu-trigger { min-width: 34px; font-size: 1.05rem; line-height: 1; letter-spacing: .05em; }
.nx-menu-backdrop { position: fixed; inset: 0; z-index: 40; }
.nx-menu-list { position: absolute; z-index: 41; top: calc(100% + 6px); left: 0; min-width: 230px; max-width: min(300px, 86vw); padding: 6px;
    background: var(--nx-bg-elevated); border: 1px solid var(--nx-border); border-radius: 10px; box-shadow: var(--nx-shadow); display: flex; flex-direction: column; }
.nx-menu-item { font: inherit; font-size: 0.86rem; text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--nx-text); cursor: pointer; }
.nx-menu-item:hover:not(:disabled), .nx-menu-item:focus-visible { background: var(--nx-bg-hover); outline: none; }
.nx-menu-item:focus-visible { box-shadow: 0 0 0 2px rgba(90, 209, 255, .45); }
.nx-menu-item:disabled { color: var(--nx-text-faint); cursor: not-allowed; }
.nx-menu-item-danger { color: #FCA5A5; }

/* ---------- focus: everything clickable shows where the keyboard is ---------- */
.bc-chip:focus-visible, .bc-type:focus-visible, .dc-section > summary:focus-visible, .dc-remove:focus-visible, .nx-link-btn:focus-visible,
.dc-lang-switch button:focus-visible { outline: 2px solid var(--nx-accent); outline-offset: 2px; }

/* ---------- preview dialog ---------- */
.bc-preview-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 18px; background: var(--nx-bg-elevated);
    border: 1px solid var(--nx-border); border-radius: 14px; box-shadow: var(--nx-shadow); }
.bc-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bc-preview-head h2 { margin: 0; font-size: 1.05rem; }
.bc-preview-dialog .bc-hint { margin-top: 10px; }

/* ---------- embed editor: steps + type picker ---------- */
.bc-back { margin-bottom: 10px; font-size: 0.88rem; }
.bc-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; counter-reset: none; }
.bc-steps li { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--nx-text-faint); padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--nx-border-soft); }
.bc-steps li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; background: var(--nx-bg-hover); }
.bc-steps li.done { color: var(--nx-text-dim); }
.bc-steps li.done span { background: rgba(74, 222, 128, .2); color: #6EE7A0; }
.bc-steps li.current { color: var(--nx-text); border-color: rgba(90, 209, 255, .5); }
.bc-steps li.current span { background: var(--nx-accent); color: var(--nx-accent-contrast); }
.bc-step-title { font-size: 1.05rem; margin: 0 0 12px; }
.bc-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.bc-type { font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 16px;
    background: var(--nx-bg-card); border: 1px solid var(--nx-border-soft); border-radius: 12px; transition: border-color .15s ease, background .15s ease; }
.bc-type:hover { border-color: var(--nx-accent-dim); background: var(--nx-bg-hover); }
.bc-type-icon { font-size: 1.5rem; }
.bc-type-name { font-weight: 700; }
.bc-type-desc { font-size: 0.84rem; color: var(--nx-text-dim); line-height: 1.4; }
.bc-type-current { padding: 8px 0; font-weight: 600; }
.bc-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.bc-item-tools { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.bc-system-note { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; font-size: 0.86rem; line-height: 1.45;
    background: rgba(147, 164, 186, .1); border: 1px solid rgba(147, 164, 186, .22); color: var(--nx-text-dim); }
.bc-system-note strong { color: var(--nx-text); }

/* ---------- editors (system + custom) ---------- */
.dc-page .nx-field input, .dc-page .nx-field select, .dc-page .nx-field textarea, .dc-page .nx-input { max-width: none !important; width: 100%; box-sizing: border-box; }
.dc-page .nx-field input.nx-color-swatch { width: 42px; flex: 0 0 42px; }
.dc-page .nx-field input.nx-color-hex { flex: 0 0 140px; max-width: none !important; }
.dc-page .nx-field input[type=checkbox], .dc-page input[type=color] { width: auto; }
.dc-page .cp-color input.nx-input { flex: 0 1 140px; }
.dc-page .nx-field { display: block; margin-bottom: 12px; min-width: 0; }

.dc-topbar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dc-topbar-title h1 { margin: 2px 0 0; font-size: 1.45rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-topbar-title p { margin: 6px 0 0; color: var(--nx-text-dim); font-size: 0.9rem; max-width: 760px; }

/* standard · customized · unsaved (labels come from the text catalog) */
.dc-state { font-size: 0.66rem; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; white-space: nowrap; vertical-align: middle; }
.dc-state-standard { background: rgba(147, 164, 186, .14); color: var(--nx-text-dim); }
.dc-state-customized { background: rgba(90, 209, 255, .16); color: var(--nx-accent); }
.dc-state-unsaved { background: rgba(245, 166, 35, .18); color: #F5A623; }

.dc-shell { display: grid; gap: 22px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(340px, 480px); }
.dc-editor { min-width: 0; }
.dc-preview { min-width: 0; position: sticky; top: 18px; max-height: calc(100vh - 110px); overflow: auto; }

.dc-lang-switch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.dc-lang-switch button { font: inherit; font-size: 0.86rem; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--nx-border); background: transparent; color: var(--nx-text-dim); cursor: pointer; }
.dc-lang-switch button.active { background: rgba(90, 209, 255, .14); border-color: rgba(90, 209, 255, .45); color: var(--nx-text); }
.dc-lang-note { font-size: 0.8rem; color: var(--nx-text-faint); margin-left: 6px; }

.dc-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.dc-section { background: var(--nx-bg-card); border: 1px solid var(--nx-border-soft); border-radius: var(--nx-radius); padding: 0 16px; margin-bottom: 10px; }
.dc-section > summary { cursor: pointer; list-style: none; padding: 13px 0; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.dc-section > summary::-webkit-details-marker { display: none; }
.dc-section > summary::before { content: "▸"; color: var(--nx-text-faint); transition: transform .15s ease; }
.dc-section[open] > summary::before { transform: rotate(90deg); }
.dc-section[open] { padding-bottom: 6px; }
.dc-count { font-size: 0.72rem; font-weight: 600; color: var(--nx-text-faint); background: var(--nx-bg-hover); border-radius: 10px; padding: 1px 8px; }
.dc-hint { font-size: 0.82rem; color: var(--nx-text-dim); margin: 0 0 10px; }

.dc-item { border: 1px solid var(--nx-border-soft); border-radius: 10px; padding: 10px 12px 2px; margin-bottom: 10px; }
.dc-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.88rem; }
.dc-item-head small { color: var(--nx-text-dim); flex-basis: 100%; }
.dc-kind { font-size: 0.66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-text-faint); }
.dc-inline { font-size: 0.82rem; display: flex; gap: 6px; align-items: center; color: var(--nx-text-dim); margin: 0 0 10px; }
.dc-item-head .dc-inline { margin: 0 0 0 auto; white-space: nowrap; }
.dc-remove { background: none; border: 0; color: #FF8A8E; cursor: pointer; font: inherit; font-size: 0.82rem; padding: 2px 4px; border-radius: 4px; }
.dc-button-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(90px, 0.5fr) minmax(0, 1.4fr); gap: 0 12px; }

.dc-errors { margin: 4px 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(229, 72, 77, .12); color: #ff9b9e; font-size: 0.85rem; }
.dc-revisions { list-style: none; margin: 0 0 12px; padding: 0; font-size: 0.82rem; }
.dc-revisions li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--nx-border-soft); }

/* sticky action bar */
.dc-actionbar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px;
    padding: 12px 16px; background: var(--nx-bg-elevated); border: 1px solid var(--nx-border); border-radius: var(--nx-radius); box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .8); }
.dc-actionbar-status { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.dc-status { font-size: 0.83rem; }
.dc-status-ok { color: #4ADE80; }
.dc-status-err { color: #FF8A8E; }
.dc-status-warn { color: #F5A623; }

.dc-preview-title { font-weight: 650; margin-bottom: 8px; font-size: 0.9rem; color: var(--nx-text-dim); }
.dc-preview-note { font-size: 0.78rem; color: var(--nx-text-faint); margin-top: 8px; }

/* ---------- Discord-like message preview ---------- */
.dmp { background: #313338; border-radius: 10px; padding: 16px; display: flex; gap: 14px; font-family: "gg sans", "Segoe UI", system-ui, sans-serif; color: #dbdee1; min-width: 0; }
.dmp-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--nx-accent); color: #06141f; display: grid; place-items: center; font-weight: 800; flex: 0 0 40px; }
.dmp-body { min-width: 0; flex: 1; }
.dmp-head { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.dmp-bot { font-weight: 600; color: #f2f3f5; }
.dmp-tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 4px; border-radius: 3px; }
.dmp-time { font-size: 12px; color: #949ba4; }
.dmp-mention { display: inline-block; margin-bottom: 6px; padding: 0 3px; border-radius: 3px; background: rgba(88, 101, 242, .3); color: #c9cdfb; font-weight: 500; }
.dmp-embed { background: #2b2d31; border-left: 4px solid var(--nx-accent); border-radius: 4px; padding: 10px 14px 14px 12px; display: flex; gap: 12px; max-width: 520px; }
.dmp-main { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.dmp-author { font-size: 13px; font-weight: 600; color: #f2f3f5; margin: 4px 0 6px; }
.dmp-title { font-size: 15px; font-weight: 700; color: #f2f3f5; margin-bottom: 6px; }
.dmp-title.dmp-link { color: #00a8fc; }
.dmp-desc { font-size: 14px; line-height: 1.4; }
.dmp-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin-top: 8px; }
.dmp-field { grid-column: 1 / -1; font-size: 13px; min-width: 0; }
.dmp-field.inline { grid-column: auto; }
.dmp-fname { font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }
.dmp-system { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 4px; border-radius: 3px; background: rgba(147, 164, 186, .25); color: #c3cfdd; vertical-align: middle; }
.dmp-image { width: 100%; border-radius: 4px; margin-top: 12px; display: block; }
.dmp-placeholder { margin-top: 12px; height: 100px; border-radius: 4px; background: linear-gradient(90deg, #0b1016, #1b2530); display: grid; place-items: center; color: #93a1ad; font-size: 12px; }
.dmp-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; flex: 0 0 80px; }
.dmp-footer { font-size: 12px; color: #b5bac1; margin-top: 10px; }
.dmp-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dmp-btn { font-size: 14px; font-weight: 500; padding: 5px 14px; border-radius: 4px; color: #fff; display: inline-flex; align-items: center; gap: 6px; background: #4e5058; }
.dmp-btn-primary { background: #5865f2; }
.dmp-btn-success { background: #248046; }
.dmp-btn-danger { background: #da373c; }

/* ---------- breakpoints — LAST, so they override the base rules above ---------- */
@media (max-width: 1199px) {
    .bc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* tablet + 1366 with sidebar: 2 per row */
}
@media (max-width: 1099px) {
    .dc-shell { grid-template-columns: minmax(0, 1fr); }
    .dc-preview { position: static; max-height: none; order: -1; }
}
@media (max-width: 720px) {
    .bc-grid, .bc-form-grid, .dc-button-grid, .bc-meta { grid-template-columns: minmax(0, 1fr); }
    .bc-toolbar { padding: 14px; }
    .bc-toolbar-actions, .bc-toolbar-actions .nx-btn { width: 100%; }
    .bc-toolbar-actions .nx-btn { justify-content: center; text-align: center; }
    .bc-search { flex-basis: 100%; }
    .dmp { padding: 12px; gap: 10px; }
    .dmp-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Embed quota in the "Eigene Embeds" category (docs/LICENSE_ENTITLEMENTS.md) */
.bc-usage { margin: 6px 0 0; font-size: 0.82rem; font-weight: 600; color: var(--nx-text); }
