/* Edahnien CSS — autogeneriert aus edahnien.css */

/* ── Chat-System (Burgplatz-Variante A · Sprechblasen) ────────────────────── */

/* Shell — gleiche Glasoptik wie .stat-block / Nav */
.chat-shell {
    position: relative;
    width: 100%; max-width: 760px;
    display: flex; flex-direction: column;
    background: rgba(6,9,4,0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    overflow: hidden;
    font-family: 'IM Fell English', Georgia, serif;
}

/* Kopf — leicht abgesetzt, wie .navhead */
.chat-head {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--line);
    background: rgba(6,9,4,0.4);
    padding: 9px 14px;
    display: flex; align-items: center; gap: 12px;
}
.chat-head .head-text { flex: 1; min-width: 0; }
.chat-head .title {
    font-family: 'Cinzel', serif;
    font-size: 10px; letter-spacing: 0.3em;
    color: var(--jade-bright); text-transform: uppercase;
}
.chat-head .head-row {
    display: flex; align-items: center; gap: 8px; margin-top: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; color: var(--ink-faint);
    letter-spacing: 0.14em; text-transform: uppercase;
}
.chat-head .head-row .sep   { opacity: 0.4; }
.chat-head .head-row .grow  { flex: 1; }
.chat-head .head-row .online { color: var(--jade); }
.online-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--jade);
    box-shadow: 0 0 5px var(--jade-glow);
    animation: ch-pulse 2s ease-in-out infinite;
    display: inline-block; flex-shrink: 0;
}
@keyframes ch-pulse {
    0%,100% { opacity: 0.4; transform: scale(0.85); }
    50%      { opacity: 1;   transform: scale(1.1); }
}

/* Avatar — kleiner, dezenter Kreis */
.chat-shell .avatar {
    border-radius: 50%;
    background: rgba(15,22,8,0.7);
    border: 1px solid var(--line-strong);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto; overflow: hidden;
}
.chat-shell .avatar .glyph {
    font-family: 'Cinzel', serif;
    color: var(--jade-bright); font-size: 11px; user-select: none;
}
.chat-shell .avatar.lg { width: 36px; height: 36px; }
.chat-shell .avatar.lg .glyph { font-size: 13px; }
.chat-shell .avatar.md { width: 28px; height: 28px; }
.chat-shell .avatar.npc { border-color: rgba(201,163,104,0.3); }
.chat-shell .avatar.npc .glyph { color: var(--gold-bright); }

/* Nachrichten-Scroll */
.chat-scroll {
    flex: 1; overflow-y: auto; position: relative;
    min-height: 180px; max-height: 420px;
    scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.chat-scroll::-webkit-scrollbar { width: 4px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }
.stack {
    display: flex; flex-direction: column;
    padding: 12px 10px; gap: 8px;
}

/* Nachrichten-Gruppen */
.group { display: flex; gap: 8px; align-items: flex-end; }
.group .col {
    display: flex; flex-direction: column; gap: 2px;
    max-width: calc(100% - 64px); min-width: 0;
}
.name-row {
    display: flex; gap: 6px; align-items: baseline;
    font-family: 'Cinzel', serif;
    font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 0 3px; color: var(--ink-faint);
}
.name-row .name { color: var(--jade-bright); }
.name-row .stamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; color: var(--ink-faint); opacity: 0.7;
}
.group.own .name-row .name { color: var(--gold-bright); }
.group.npc .name-row .name { color: var(--gold-bright); }

/* Sprechblasen — wie .stat-block, aber leichter */
.bubble {
    padding: 7px 12px 8px;
    border: 1px solid var(--line-strong);
    background: rgba(6,9,4,0.88);
    font-family: 'IM Fell English', Georgia, serif;
    font-size: 14px; line-height: 1.5;
    color: #e8efe2; border-radius: 2px; max-width: 100%;
    word-break: break-word;
    opacity: 1; transform: none;
}
.group.own .bubble {
    border-color: rgba(201,163,104,0.3);
    background: rgba(18,12,4,0.92);
    color: #e8efe2;
}
.bubble.npc {
    border-color: rgba(201,163,104,0.3);
    background: rgba(18,12,4,0.88);
    color: #e8efe2;
}
.bubble.me {
    background: transparent; border-style: dashed;
    border-color: var(--line-strong);
    color: var(--jade-bright); font-style: italic;
}
.bubble strong { font-weight: 700; }

/* Gate-Overlay (Beitritt) */
.chat-shell.locked .chat-scroll {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}
.chat-shell.locked .chat-dock {
    filter: blur(3px);
    pointer-events: none;
    opacity: 0.35;
}
.chat-gate {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.chat-shell:not(.locked) .chat-gate { display: none; }
.chat-gate-inner {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 26px 38px;
    background: rgba(6,9,4,0.86);
    border: 1px solid var(--line-strong);
    text-align: center;
}
.chat-gate-icon { font-size: 26px; opacity: 0.45; line-height: 1; }
.chat-gate-title {
    font-family: 'Cinzel', serif;
    font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
    color: var(--jade-bright);
}
.chat-gate-sub {
    font-family: 'IM Fell English', Georgia, serif;
    font-size: 12px; color: var(--ink-faint); font-style: italic;
    margin-top: -6px;
}
.chat-gate-btn {
    font-family: 'Cinzel', serif;
    font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--ink);
    background: rgba(74,222,128,0.07);
    border: 1px solid var(--jade);
    padding: 9px 22px; cursor: pointer;
    transition: background .15s, color .15s;
    margin-top: 4px;
}
.chat-gate-btn:hover {
    background: rgba(74,222,128,0.18);
    color: var(--jade-bright);
}

/* Szenen-Trenner */
.scene-wrap { display: contents; }
.scene-divider {
    display: flex; align-items: center; gap: 10px;
    color: var(--ink-faint);
    font-family: 'Cinzel', serif;
    font-size: 8.5px; letter-spacing: 0.3em; text-transform: uppercase;
    padding: 4px 2px 0; margin: 4px 0 -4px;
}
.scene-divider::before, .scene-divider::after {
    content: ""; flex: 1; height: 1px;
    background: var(--line-strong);
}
.scene-divider .marker { color: var(--jade); opacity: 0.5; }
.scene-line {
    align-self: center; max-width: 88%;
    padding: 5px 12px; margin: 0 auto; text-align: center;
    font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 13px;
    color: var(--jade-bright);
    background: rgba(74,222,128,0.04);
    border: 1px solid var(--line); border-radius: 2px;
    word-break: break-word;
}

/* Dock — identisch zum Nav-Hintergrund */
.chat-dock {
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    background: rgba(6,9,4,0.65);
}
.fmt-row {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
    padding: 6px 10px; border-bottom: 1px solid var(--line);
}
.fmt-row .lbl {
    font-family: 'Cinzel', serif;
    font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink-faint); margin-right: 3px;
}
.fmt-row .grow { flex: 1; }

/* Format-Chips */
.fmt-chip {
    appearance: none;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    width: 20px; height: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; border-radius: 2px;
    transition: border-color .12s, background .12s;
}
.fmt-chip:hover { border-color: var(--jade); background: rgba(74,222,128,0.08); }
.fmt-chip.c1 { color: var(--ink); }
.fmt-chip.c2 { color: var(--jade); }
.fmt-chip.c3 { color: var(--gold-bright); }
.fmt-chip.c4 { color: var(--blood-bright); }
.fmt-chip.c5 { color: #8aa9ff; }
.fmt-chip.c6 { color: #c293ff; }
.fmt-chip.c7 { color: #62d3b3; }
.fmt-chip.b  { font-weight: 800; color: var(--ink); }

/* Tag-Chips — wie nav-Links */
.tag-chip {
    appearance: none;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    font-family: 'Cinzel', serif;
    font-size: 8.5px; letter-spacing: 0.18em;
    padding: 3px 7px; cursor: pointer; text-transform: uppercase;
    border-radius: 2px;
    transition: color .12s, border-color .12s, background .12s;
}
.tag-chip:hover { border-color: var(--jade-bright); color: var(--jade-bright); background: rgba(74,222,128,0.06); }
.tag-chip.me { color: var(--gold); font-style: italic; }
.tag-chip.me.ct-active { border-color: var(--gold); color: var(--gold-bright); background: rgba(201,163,104,0.08); }
.chat-refresh-chip { font-size: 12px; line-height: 1; }
.chat-leave-btn {
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none;
    color: var(--ink-faint);
    cursor: pointer; padding: 2px;
    opacity: 0.45;
    transition: opacity .15s, color .15s;
    flex-shrink: 0;
}
.chat-leave-btn svg { width: 13px; height: 13px; }
.chat-leave-btn:hover { opacity: 1; color: #e87070; }

/* Live-Vorschau */
.chat-dock .chat-preview {
    display: none; padding: 3px 12px; font-size: 12px;
    color: rgba(232,239,226,0.35); font-style: italic;
    border-bottom: 1px solid var(--line); word-break: break-word;
}
.chat-dock .chat-preview--visible { display: block; }
.chat-dock .chat-preview .prev-emote { color: rgba(232,200,140,0.6); }
.chat-dock .chat-preview .prev-scene  { color: rgba(74,222,128,0.45); }
.chat-dock .chat-preview .prev-npc    { color: rgba(232,200,140,0.65); }

/* Eingabe-Zeile */
.input-row { display: flex; align-items: stretch; padding: 7px 10px 9px; }
.input-field {
    flex: 1; background: rgba(0,0,0,0.35);
    border: 1px solid var(--line-strong);
    color: var(--ink); padding: 7px 12px;
    font-family: inherit; font-size: 13px;
    outline: none; border-radius: 2px 0 0 2px;
    transition: border-color .15s;
}
.input-field::placeholder { color: var(--ink-faint); font-style: italic; }
.input-field:focus { border-color: rgba(74,222,128,0.4); }
.input-field:disabled { opacity: .5; cursor: not-allowed; }
.input-field.chat-input-err { border-color: rgba(248,113,113,0.55); animation: ch-shake .28s ease; }
@keyframes ch-shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}
.send-btn {
    appearance: none;
    background: rgba(74,222,128,0.07);
    border: 1px solid var(--line-strong); border-left: none;
    color: var(--jade); width: 40px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 0 2px 2px 0; transition: background .12s, color .12s;
}
.send-btn:hover { background: rgba(74,222,128,0.15); color: var(--jade-bright); }
.send-btn svg { width: 16px; height: 16px; }
.combat-cta-btn.sec:hover { background: rgba(134,239,172,0.12); color: var(--ink); }

