/* ============================================================================
   Design Normalize – Einheitliche Button/UI-Konsistenz über alle Szenen
   Geladen NACH app.css und VOR den szenen-spezifischen Stylesheets.
   Behebt:
   - Rahmensprung bei :focus/:active (fehlende transition + outline-Inkonsistenz)
   - Unterschiedliche Button-Größen (fehlende Basis font-size/line-height/box-sizing)
   - Inkonsistente border-radius zwischen Szenen
   - Abrupte visuelle Änderungen bei Hover/Focus
   ============================================================================ */

/* ── 1. Basis .btn Normalisierung ──
   Die originale .btn Definition hat kein font-size, font-weight, line-height.
   Das führt dazu, dass Buttons je nach Eltern-Kontext unterschiedlich groß sind. */
.btn{
  box-sizing:border-box;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:.02em;
  vertical-align:middle;
  /* Sanfte Übergänge für ALLE visuellen Eigenschaften die sich bei Interaktion ändern */
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    color .15s ease,
    transform .15s ease,
    opacity .15s ease;
}

/* ── 2. Einheitlicher Focus-Ring ──
   Verhindert den "Rahmensprung" bei Klick. Alle Buttons bekommen denselben
   Focus-Indikator: box-shadow statt outline (funktioniert mit clip-path). */
.btn:focus{
  outline:none;
}
.btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px rgba(142,194,255,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Buttons die NICHT :focus-visible unterstützen (ältere Browser) */
.btn:focus:not(:focus-visible){
  outline:none;
  box-shadow:none;
}

/* ── 3. Active-State (Klick) ──
   Verhindert visuellen "Sprung" beim Klicken */
.btn:active:not(:disabled){
  transform:translateY(0.5px);
  transition-duration:.06s;
}

/* ── 4. btn-wrap Focus-Konsistenz ──
   Der .btn-wrap bekommt bei Focus einen outline der mit border-radius:12px
   gesetzt wird, aber in combat-crystal wird das auf 0 gesetzt. Einheitlich machen. */
.btn-wrap:focus{
  outline:none;
}
.btn-wrap:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px rgba(142,194,255,0.28);
  border-radius:inherit;
}
.btn-wrap:focus:not(:focus-visible){
  outline:none;
  box-shadow:none;
}


/* ── 5. Szenen-übergreifende Button-Höhen-Normalisierung ──
   Verschiedene Szenen setzen min-height auf 34px, 38px, 40px, 42px, 44px.
   Wir normalisieren auf zwei Stufen: Standard (38px) und Compact (34px). */

/* Standard-Buttons in Sheet-Szenen (Loot, Guild, Quests, Tickets, Stats, Chat) */
.loot-hero-actions .btn,
.loot-hero-actions button.btn,
.guild-stage-shell .guild-sheet .btn,
.guild-stage-shell .guild-sheet button.btn,
.guild-stage-shell .guild-admin-sheet .btn,
.guild-stage-shell .guild-admin-sheet button.btn,
.quests-stage-shell .quests-sheet .btn,
.quests-stage-shell .quests-sheet button.btn,
.tickets-stage-shell .tickets-sheet .btn,
.tickets-stage-shell .tickets-sheet button.btn{
  min-height:38px;
  padding:0 16px;
}

/* ── 6. Einheitlicher Szenen-Button-Style (Freeze-Sprache) ──
   Alle Szenen-Shells verwenden dasselbe visuelle Muster:
   - border: rgba(188,151,129, .26)
   - background: linear-gradient warm-dark
   - clip-path: angled corners
   Aber die Werte weichen leicht ab. Hier normalisieren wir die Hover/Focus-States. */

/* Einheitlicher Hover für alle Szenen-Buttons */
.loot-hero-actions .btn:hover,
.loot-hero-actions .btn:focus-visible,
.loot-hero-actions button.btn:hover,
.loot-hero-actions button.btn:focus-visible,
.guild-stage-shell .guild-sheet .btn:hover,
.guild-stage-shell .guild-sheet .btn:focus-visible,
.guild-stage-shell .guild-sheet button.btn:hover,
.guild-stage-shell .guild-sheet button.btn:focus-visible,
.guild-stage-shell .guild-admin-sheet .btn:hover,
.guild-stage-shell .guild-admin-sheet .btn:focus-visible,
.guild-stage-shell .guild-admin-sheet button.btn:hover,
.guild-stage-shell .guild-admin-sheet button.btn:focus-visible,
.quests-stage-shell .quests-sheet .btn:hover,
.quests-stage-shell .quests-sheet .btn:focus-visible,
.quests-stage-shell .quests-sheet button.btn:hover,
.quests-stage-shell .quests-sheet button.btn:focus-visible,
.tickets-stage-shell .tickets-sheet .btn:hover,
.tickets-stage-shell .tickets-sheet .btn:focus-visible,
.tickets-stage-shell .tickets-sheet button.btn:hover,
.tickets-stage-shell .tickets-sheet button.btn:focus-visible{
  border-color:rgba(226,183,154,.36);
  background:linear-gradient(180deg, rgba(86,57,61,.98), rgba(27,16,23,.995));
  color:#fff8f3;
}

/* Einheitlicher Primary-Hover für alle Szenen-Buttons */
.loot-hero-actions .btn.primary:hover,
.loot-hero-actions .btn.primary:focus-visible,
.loot-hero-actions button.btn.primary:hover,
.loot-hero-actions button.btn.primary:focus-visible,
.guild-stage-shell .guild-sheet .btn.primary:hover,
.guild-stage-shell .guild-sheet .btn.primary:focus-visible,
.guild-stage-shell .guild-sheet button.btn.primary:hover,
.guild-stage-shell .guild-sheet button.btn.primary:focus-visible,
.guild-stage-shell .guild-admin-sheet .btn.primary:hover,
.guild-stage-shell .guild-admin-sheet .btn.primary:focus-visible,
.guild-stage-shell .guild-admin-sheet button.btn.primary:hover,
.guild-stage-shell .guild-admin-sheet button.btn.primary:focus-visible,
.quests-stage-shell .quests-sheet .btn.primary:hover,
.quests-stage-shell .quests-sheet .btn.primary:focus-visible,
.quests-stage-shell .quests-sheet button.btn.primary:hover,
.quests-stage-shell .quests-sheet button.btn.primary:focus-visible,
.tickets-stage-shell .tickets-sheet .btn.primary:hover,
.tickets-stage-shell .tickets-sheet .btn.primary:focus-visible,
.tickets-stage-shell .tickets-sheet button.btn.primary:hover,
.tickets-stage-shell .tickets-sheet button.btn.primary:focus-visible{
  border-color:rgba(190,220,255,.42);
  background:linear-gradient(180deg, rgba(78,92,132,.98), rgba(24,29,45,.998));
}

/* ── 7. Controlbar-Panel Buttons ──
   cb-pp-tab, cb-gd-tab, cb-panel-action haben alle denselben Stil,
   aber keine transition. Das verursacht abrupte Farbwechsel. */
.cb-pp-tab,
.cb-gd-tab,
.cb-panel-action{
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    color .15s ease;
}

/* ── 8. Nav-Buttons Transition ──
   Die .nav a und .nav-link-button haben transition, aber nur für
   background, border-color, transform. box-shadow fehlt. */
.nav a,
.nav-link-button{
  transition:
    background .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    transform .14s ease;
}
.nav a:focus-visible,
.nav-link-button:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px rgba(142,194,255,0.28);
}

/* ── 9. Input Focus Konsistenz ──
   Verschiedene Inputs haben unterschiedliche Focus-Styles.
   Normalisieren auf einheitlichen Ring. */
.input:focus,
textarea.input:focus,
select.input:focus{
  outline:none;
  border-color:rgba(142,194,255,0.34);
  box-shadow:0 0 0 2px rgba(142,194,255,0.10);
}

/* ── 10. Map-Pill Transition ──
   .map-pill hat keine transition, was zu abrupten Änderungen führt. */
.map-pill{
  transition:
    background .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    opacity .14s ease;
}

/* ── 11. Inventory Item Card Transition ──
   Die inv-item-card hat transition, aber outline fehlt bei focus-visible. */
.inv-item-card:focus-visible{
  outline:none;
}

/* ── 12. Stats/Kills Pagination Buttons ──
   Fehlende transition auf den Pagination-Buttons. */
.stats-page-btn,
.kills-detail-btn,
.stats-dm-btn,
.stats-filter-tab,
.kills-filter-tab,
.stats-search-btn,
.kills-search-btn,
.stats-inline-link{
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

/* ── 13. Chat Buttons ──
   chatSend und chatTab haben keine einheitliche transition. */
.chat-stage-shell .chatSend,
.chat-stage-shell .chatTab{
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    color .15s ease;
}

/* ── 14. Disabled-State Konsistenz ──
   Manche Buttons haben opacity:.45, andere .55, andere .68.
   Normalisieren auf .55 für alle. */
.btn:disabled,
.btn[disabled],
.btn-wrap.is-disabled .btn{
  opacity:0.55;
  cursor:not-allowed;
  pointer-events:none;
}

/* ── 15. Arena Mode Switch ──
   Fehlende transition. */
.arena-mode-switch__btn{
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    color .15s ease;
}
.arena-mode-switch__btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px rgba(142,194,255,0.28);
}


/* ── 16. Public Nav Links ──
   .public-nav a hat keine transition, nur .public-nav-button.
   Beide sollten identisch animieren. */
.public-nav a{
  transition:background .14s ease,border-color .14s ease,transform .14s ease,box-shadow .14s ease;
}

/* ── 17. Status Button ──
   .status-btn hat keine transition. */
.status-btn{
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease;
}

/* ── 18. NPC Quest Row ──
   .npc-quest-row hat keine transition. */
.npc-quest-row{
  transition:border-color .14s ease,background .14s ease,box-shadow .14s ease;
}

/* ── 19. Map Legend Close + Marker Icon ──
   .ml-close und .marker-ic haben keine transition. */
.map-legend .ml-close,
.marker-ic{
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease;
}

/* ── 20. Status Options ──
   .status-opt hat keine transition. */
.status-opt{
  transition:background .14s ease,border-color .14s ease;
}

/* ── 21. Avatar Gear Slot ──
   .avatar-gear-slot hat keine transition. */
.avatar-gear-slot{
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}

/* ── 22. Dungeon Action Buttons ──
   Dungeon-Szene erbt play_stage_shared Styles, aber die
   .dungeon-action-grid .btn haben keine eigene min-height.
   Normalisieren auf 38px wie andere Szenen. */
.dungeon-action-grid .btn,
.dungeon-exit-form .btn{
  min-height:38px;
}

/* ── 23. Portal Console Buttons ──
   Portal-Buttons haben keine transition. */
.portal-console__actionsbar .btn,
.portal-gate__actionrow .btn{
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}

/* ── 24. Char Slot Play Button (Public) ──
   .public-char-slot-playbtn hat keine transition. */
.public-char-slot-playbtn{
  transition:border-color .14s ease,background .14s ease,box-shadow .14s ease,transform .14s ease;
}

/* ============================================================================
   Inline-Style Auslagerung – Spielseiten
   Ersetzt hardcodierte style="" Attribute durch wiederverwendbare Klassen.
   ============================================================================ */

/* ── combat.php ── */
.combat-target-statusrow{margin-top:8px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.combat-target-statuswrap{flex:1 1 auto;min-width:160px;}
.combat-preview-line{margin-top:8px;}
.combat-action-selects-hidden{display:none;}

/* ── game.php (marker prompt) ── */
.marker-err{margin-top:8px;color:rgba(255,123,114,.95);display:none;}
.marker-icon-label{margin-top:10px;}
.marker-delete-hidden{display:none;}

/* ── character.php ── */
.page-head-title{margin:0;}
.alert-spaced{margin-top:12px;}

/* ── npc/board.php ── */
.npc-board-spaced{margin-top:12px;}
.npc-board-sub{margin-top:4px;}
.npc-quest-detail-spaced{margin-top:12px;}
.npc-quest-detail-head{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;align-items:center;}
.npc-quest-chain-note{margin-top:6px;}
.npc-quest-detail-panel{margin-top:10px;}
.npc-quest-detail-title{font-size:18px;}
.npc-quest-detail-desc{margin-top:8px;line-height:1.35;}
.npc-quest-detail-meta{margin-top:10px;}
.npc-quest-progress-spaced{margin-top:12px;}
.npc-quest-progress-note{margin-top:6px;}
.npc-quest-reward-note{margin-top:10px;}
.npc-quest-empty{margin-top:12px;}
.npc-qtable-wrap{margin-top:12px;}
.npc-qtable-title{font-weight:900;}
.npc-qtable-tag{margin-top:4px;}
.npc-qtable-action{text-align:right;}
.npc-qtable-action-col{width:120px;}
.npc-rumors-panel{margin-top:12px;}
.npc-rumors-sub{margin-top:6px;}
.npc-rumors-grid{margin-top:12px;}
.npc-rumor-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
.npc-rumor-title{font-weight:800;}
.npc-rumor-text{margin-top:6px;}
.npc-rumor-mark{margin-top:10px;}
.npc-rumor-actions{margin-top:12px;display:flex;justify-content:flex-end;}

/* ── control_bar.php ── */
.highlight-box-hidden{display:none;margin-top:10px;}

/* ── lobby.php ── */
.lobby-env-error{margin:12px 0 0 0;flex:1 1 100%;}
