/* Edahnien CSS — autogeneriert aus edahnien.css */

/* ── Shop-Widget (dialog-embedded) ──────────────────────────────────────── */

.shop-widget {
  margin-top: 14px;
  border-top: 1px dashed rgba(74,222,128,0.20);
  padding-top: 14px;
}

/* Head: title + wallet row */
.sw-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sw-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--gold-bright, #f5d896);
  font-weight: 600;
  text-transform: uppercase;
}
.sw-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-dim, #b9a982);
  margin-top: 2px;
}
.sw-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold, #e8c98c);
  padding: 6px 12px;
  border: 1px solid rgba(232,201,140,0.30);
  background: rgba(40,28,8,0.40);
  border-radius: 2px;
}
.sw-wallet-val {
  color: var(--gold-bright, #f5d896);
  font-weight: 700;
}

/* SVG-Münzicons (dlgMoneyHtml) */
.sw-coin-img {
  width: 14px; height: 14px;
  vertical-align: middle;
  margin-right: 1px;
  position: relative; top: -1px;
  flex-shrink: 0;
}

/* Loading / empty state */
.sw-loading, .sw-empty {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--ink-faint, #8a7a5c);
  font-size: 14px;
  padding: 18px 0;
  text-align: center;
}

/* Tabs */
.sw-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(74,222,128,0.12);
}
.sw-tab {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-dim, #b9a982);
  padding: 6px 12px 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.sw-tab:hover { color: var(--ink, #e9dcc0); }
.sw-tab.active {
  color: var(--jade, #4ade80);
  border-color: rgba(74,222,128,0.35);
  background: rgba(20,40,18,0.45);
}
.sw-tab-count {
  font-size: 10px;
  color: var(--ink-faint, #8a7a5c);
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  letter-spacing: 0.05em;
}
.sw-tab.active .sw-tab-count {
  color: var(--jade, #4ade80);
  background: rgba(74,222,128,0.10);
}

/* Card grid */
.sw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

/* Individual card */
.sw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(6,14,6,0.75);
  border: 1px solid rgba(74,222,128,0.18);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.sw-card:hover {
  border-color: rgba(74,222,128,0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.55), 0 0 0 1px rgba(74,222,128,0.10);
}

/* Unaffordable */
.sw-card.broke {
  opacity: 0.32;
  filter: saturate(0.4);
  pointer-events: none;
}
.sw-card.broke::after {
  content: "ZU TEUER";
  position: absolute;
  top: 10px; right: 10px;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: #ff9090;
  background: rgba(40,8,8,0.85);
  border: 1px solid rgba(220,90,90,0.45);
  padding: 3px 7px;
  border-radius: 1px;
  z-index: 2;
}

/* Card image area */
.sw-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg,
      rgba(232,220,192,0.06) 0 8px,
      rgba(232,220,192,0.02) 8px 16px),
    linear-gradient(180deg, #1a1408, #0a0604);
  border-bottom: 1px solid rgba(74,222,128,0.12);
  overflow: hidden;
}

/* Rarity stripe at top of image */
.sw-rar-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #9aa896;
  opacity: 0.7;
}
.sw-card[data-rar="uncommon"]  .sw-rar-stripe { background: #4ade80; }
.sw-card[data-rar="rare"]      .sw-rar-stripe { background: #5aa6ff; }
.sw-card[data-rar="epic"]      .sw-rar-stripe { background: #c084fc; }
.sw-card[data-rar="legendary"] .sw-rar-stripe { background: #e8c98c; }

/* Level badge */
.sw-lvl-badge {
  position: absolute;
  top: 7px; left: 7px;
  font-family: 'Cinzel', serif;
  font-size: 9px; letter-spacing: 0.14em;
  color: var(--ink);
  background: rgba(6,9,4,0.82);
  border: 1px solid var(--line-strong);
  padding: 2px 6px;
  pointer-events: none;
  z-index: 1;
}

/* Image placeholder */
.sw-card-img-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 10px; text-align: center;
}
.sw-ph-tag {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-faint, #8a7a5c);
  text-transform: uppercase;
}
.sw-ph-what {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-dim, #b9a982);
  text-transform: uppercase;
  border: 1px dashed rgba(232,220,192,0.30);
  padding: 4px 8px;
}

/* Card body */
.sw-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 auto;
}

/* Buy-Error */
.sw-buy-err {
  min-height: 16px;
  font-size: 11px;
  color: #ff9090;
  margin-top: 4px;
  text-align: right;
}
.sw-name {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--ink, #e9dcc0);
  letter-spacing: 0.04em;
  font-weight: 600;
  line-height: 1.2;
}
.sw-card[data-rar="uncommon"]  .sw-name { color: #aff4c4; }
.sw-card[data-rar="rare"]      .sw-name { color: #b8d6ff; }
.sw-card[data-rar="epic"]      .sw-name { color: #dbc1ff; }
.sw-card[data-rar="legendary"] .sw-name { color: var(--gold-bright, #f5d896); }

.sw-flavor {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-dim, #b9a982);
  min-height: 3.6em;
  flex: 1 1 auto;
}

/* Stats pills */
.sw-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.sw-stat {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.10em;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid rgba(232,220,192,0.14);
  color: var(--ink-dim, #b9a982);
  background: rgba(255,255,255,0.03);
}
.sw-stat-att { color: #f4a07c; border-color: rgba(244,160,124,0.25); }
.sw-stat-def { color: #7ccff4; border-color: rgba(124,207,244,0.25); }
.sw-stat-iq  { color: #c4a8e8; border-color: rgba(196,168,232,0.25); }
.sw-stat-hp  { color: #7ce87c; border-color: rgba(124,232,124,0.25); }

/* Card footer: price + buy button */
.sw-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(74,222,128,0.10);
  flex-shrink: 0;
}
.sw-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'Cinzel', serif;
  color: var(--gold-bright, #f5d896);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-price-num {
  white-space: nowrap;
}
.sw-price-unit {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold-dim, #b5965c);
  font-weight: 500;
}
.sw-buy-btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aff4c4;
  background: rgba(20,50,20,0.70);
  border: 1px solid rgba(74,222,128,0.50);
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: all 0.14s ease;
}
.sw-buy-btn::before { content: "\25b6\00a0"; font-size: 9px; opacity: 0.8; }
.sw-buy-btn:hover {
  background: rgba(40,90,36,0.90);
  color: #fff;
  border-color: var(--jade, #4ade80);
  box-shadow: 0 0 10px rgba(74,222,128,0.22);
}
.sw-buy-btn:active { transform: scale(0.97); }
.sw-buy-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Buy flash animation */
@keyframes sw-bought-flash {
  0%   { box-shadow: inset 0 0 0 2px rgba(74,222,128,0.0); }
  25%  { box-shadow: inset 0 0 0 2px rgba(74,222,128,0.7); background: rgba(20,50,20,0.65); }
  100% { box-shadow: inset 0 0 0 2px rgba(74,222,128,0.0); }
}
.sw-card.sw-bought {
  animation: sw-bought-flash 0.9s ease forwards;
}

/* Inline error/success below card foot */
.sw-buy-err {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: #f47c7c;
  padding-top: 4px;
  display: none;
}
.sw-buy-ok { color: #7ce87c; }

/* Shop footer */
.sw-foot {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(74,222,128,0.18);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faint, #8a7a5c);
}

/* Responsive */
@media (max-width: 720px) {
  .sw-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .sw-tab  { font-size: 10px; padding: 5px 9px; }
}

/* ── Arachnophobie-Platzhalter ────────────────────────────────────────────
   Ersetzte das Kreatur-Portrait wenn der Arachnophobie-Modus aktiv ist.
   Kein Bild nötig — rein CSS.
   Verwendung: <div class="arachno-ph"><div class="arachno-ph__blob"></div>
               <div class="arachno-ph__label">???</div></div>
────────────────────────────────────────────────────────────────────────── */
.arachno-ph {
  width: 100%; height: 100%;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* leichte grüne Hintergrund-Aura damit es sich ins Portrait-Frame einfügt */
  background: radial-gradient(ellipse at 50% 45%,
    rgba(50, 90, 48, 0.35) 0%,
    transparent 70%);
}

/* der Blob selbst */
.arachno-ph__blob {
  width: 62px; height: 62px;
  position: relative;
  flex-shrink: 0;
  background: radial-gradient(
    ellipse at 36% 28%,
    #b8daa8 0%,
    #52965a 45%,
    #2d6030 80%,
    #1a4020 100%
  );
  border-radius: 48% 52% 58% 42% / 42% 58% 44% 56%;
  box-shadow:
    0 5px 18px rgba(0, 0, 0, 0.60),
    inset 0 2px 4px rgba(255, 255, 255, 0.12),
    0 0 12px rgba(80, 180, 80, 0.10);
  animation: arachno-wobble 3.2s ease-in-out infinite;
}

/* × × Augen */
.arachno-ph__blob::before {
  content: '×\00a0\00a0\00a0×';   /* × + 3× NBSP + × */
  position: absolute;
  top: 27%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #1a3818;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

/* ~ Mund */
.arachno-ph__blob::after {
  content: '∿';
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: bold;
  color: #1a3818;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

/* kleines Fragezeichen-Ausrufer über dem Blob */
.arachno-ph__label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(140, 190, 120, 0.55);
  font-family: 'Cinzel', serif;
  user-select: none;
}

/* Wabbel-Animation — organisch, kein perfektes Loop */
@keyframes arachno-wobble {
  0%   { border-radius: 48% 52% 58% 42% / 42% 58% 44% 56%; transform: scaleY(1.00) scaleX(1.00); }
  15%  { border-radius: 52% 48% 50% 50% / 50% 50% 52% 48%; transform: scaleY(1.03) scaleX(0.97); }
  30%  { border-radius: 44% 56% 54% 46% / 56% 44% 48% 52%; transform: scaleY(0.97) scaleX(1.03); }
  50%  { border-radius: 56% 44% 46% 54% / 48% 52% 56% 44%; transform: scaleY(1.04) scaleX(0.96); }
  65%  { border-radius: 46% 54% 56% 44% / 54% 46% 44% 56%; transform: scaleY(0.98) scaleX(1.02); }
  80%  { border-radius: 52% 48% 44% 56% / 44% 56% 52% 48%; transform: scaleY(1.01) scaleX(0.99); }
  100% { border-radius: 48% 52% 58% 42% / 42% 58% 44% 56%; transform: scaleY(1.00) scaleX(1.00); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   KAMPFSYSTEM — Jade Skin  ·  Vollbild-Variante
   Seitentyp: combat  →  templates/layout/combat.php
   ══════════════════════════════════════════════════════════════════════════════ */

/* combat braucht overflow:hidden — gesetzt via body-Klasse 'combat-page' */
body.combat-page { overflow: hidden; }

/* ── Verkauf-Widget (dialog-embedded) — nutzt .sw-* Karten wie der Kauf-Shop ── */
.vw-widget { margin-top: 14px; }
.vw-loading, .vw-empty {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--ink-faint, #8a7a5c);
  font-size: 14px;
  padding: 18px 0;
  text-align: center;
}
.sw-slot-line {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px !important;
  font-style: normal !important;
  color: var(--gold-dim, #b5965c) !important;
  margin-bottom: 2px;
}
.sw-qty-badge {
  position: absolute;
  top: 7px; right: 7px;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--gold-bright, #f5d896);
  background: rgba(6,9,4,0.82);
  border: 1px solid var(--line-strong, rgba(232,201,140,0.35));
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
}
.sw-sell-btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright, #f5d896);
  background: rgba(50,36,10,0.70);
  border: 1px solid rgba(232,201,140,0.45);
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: all 0.14s ease;
}
.sw-sell-btn:hover:not(:disabled) {
  background: rgba(90,66,20,0.90);
  color: #fff;
  border-color: var(--gold, #e8c98c);
  box-shadow: 0 0 10px rgba(232,201,140,0.22);
}
.sw-sell-btn:active { transform: scale(0.97); }
.sw-sell-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.sw-sell-all-btn {
  margin-top: 6px;
  width: 100%;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--gold-dim, #b5965c);
  background: rgba(20,16,8,0.50);
  border: 1px dashed rgba(232,201,140,0.30);
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.sw-sell-all-btn:hover:not(:disabled) {
  color: var(--gold-bright, #f5d896);
  border-color: rgba(232,201,140,0.55);
  background: rgba(50,36,10,0.55);
}
.sw-sell-all-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ─── NPC-Roster ("Hier anwesend") in der stats-col ──────────────── */
.npc-roster {
  background: rgba(15,22,8,0.5);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.npc-roster-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade-bright, #9fad78);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.npc-roster-list { display: flex; flex-direction: column; gap: 4px; }
.npc-roster-entry {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--bone-2, #cfc6a8);
  font-family: 'Cinzel', serif;
  transition: background 0.12s, border-color 0.12s;
}
.npc-roster-entry:hover {
  background: rgba(74,222,128,0.07);
  border-color: rgba(74,222,128,0.20);
}
.npc-roster-entry.is-active {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.40);
}
.npc-roster-av {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background-size: cover; background-position: center top;
  background-color: #000;
  border: 1px solid var(--jade, #3a7a5a);
}
.npc-roster-av--empty {
  background: linear-gradient(135deg, var(--moss, #2a3a1a), var(--moss-deep, #1a260f));
}
.npc-roster-name {
  flex: 1; font-size: 12px; letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.npc-roster-dot {
  width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7CFC00, #2e7d10);
  box-shadow: 0 0 5px rgba(124,252,0,0.6);
}

/* ── Schlösser-Minigame (schloesser) ─────────────────────────────────────── */
.mg-sl-wrap { display: flex; gap: 12px; justify-content: center; align-items: flex-end; min-height: 160px; padding: 8px 4px; }
.mg-sl-pin  { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mg-sl-label { font-size: .7rem; color: #888; letter-spacing: .06em; }
.mg-sl-track { position: relative; width: 30px; height: 140px; background: #111; border: 2px solid #444; border-radius: 4px; overflow: hidden; transition: border-color .15s, box-shadow .15s; cursor: default; }
.mg-sl-pin.active .mg-sl-track { border-color: #c8922a; box-shadow: 0 0 10px rgba(200,146,42,.35); cursor: pointer; }
.mg-sl-pin.set    .mg-sl-track { border-color: #4caf50; background: #0d1f0d; cursor: default; }
.mg-sl-zone   { position: absolute; left: 0; right: 0; background: rgba(200,146,42,.30); pointer-events: none; }
.mg-sl-marker { position: absolute; left: 3px; right: 3px; height: 6px; background: #d4a843; border-radius: 3px; top: 0; pointer-events: none; transition: background .12s; }
.mg-sl-pin.set .mg-sl-zone   { background: rgba(76,175,80,.25); }
.mg-sl-pin.set .mg-sl-marker { background: #4caf50; top: 47% !important; transition: none; }
.mg-sl-picks { display: flex; gap: 8px; justify-content: center; padding: 12px 0 4px; }
.mg-sl-pick  { width: 12px; height: 38px; border-radius: 2px; transition: background .2s; }
.mg-sl-pick.intact { background: #c8922a; box-shadow: 0 0 4px rgba(200,146,42,.3); }
.mg-sl-pick.broken { background: #2a2a2a; }
