/* KCC Kurs-Laufband (Paket KURS-LAUFBAND, 27.10.2026): Laufband in allen vier Kopfzeilen + Diagramm-Fenster. Gold-Design, responsiv.
   Aus dem Orvella-Modul übernommen und auf die KCC-Farben (Theme aus den Admin-Einstellungen) umgestellt. Rundes Schliessen-Symbol aus inc/kcc-modal-close.php. */
.kk-bar, .kk-modal-bg, .kk-prev {
  --kk-gold: var(--theme-primary, #EBCB72); --kk-gold-hi: #F6DC8C; --kk-line: rgba(235, 203, 114, .22); --kk-line2: rgba(235, 203, 114, .4);
  --kk-fg: var(--theme-text-main, #F3ECDD); --kk-muted: var(--theme-text-muted, #B6A98E); --kk-dim: #8F8468; --kk-surface: rgba(255, 255, 255, .04);
  --kk-grad: var(--gold-gradient, linear-gradient(135deg, #F9E596, #EBCB72, #B07F2A)); --kk-on: #171006; --kk-bgp: var(--theme-bg-panel, #0d0a07);
  font-family: var(--main-font, inherit);
}
/* Platz: Höhe des Laufbands = Abstand, den die Seite darunter bekommt (kein Überdecken, die Seite dockt unten an) */
html { --kk-h: 46px; --kk-hb: 46px; --kk-top: 80px; }
@media (max-width: 620px) { html { --kk-h: 42px; --kk-hb: 42px; } }
html.kk-has-top { padding-top: var(--kk-h); }
html.kk-has-bot { padding-bottom: var(--kk-hb); }
.kk-bar { box-sizing: border-box; z-index: 990; height: var(--kk-h); }
.kk-bar[hidden] { display: none !important; }
.kk-bar.kk-top, .kk-bar.kk-bot { position: fixed; left: var(--sidebar-width, 280px); right: 0; transition: left .3s ease; }
.kk-bar.kk-top { top: var(--kk-top, 80px); }
.kk-bar.kk-bot { bottom: 0; height: var(--kk-hb); }
body.sidebar-collapsed .kk-bar.kk-top, body.sidebar-collapsed .kk-bar.kk-bot { left: var(--sidebar-collapsed-width, 80px); }
@media (max-width: 1024px) { .kk-bar.kk-top, .kk-bar.kk-bot { left: 0 !important; } }
.kk-prev { border: 1px solid var(--kk-line); border-radius: 12px; overflow: hidden; }
.kk-prev .kk-bar { position: static; height: auto; }
.kk-prev .fxbar { border-bottom: 0; }
@media print { .kk-bar { display: none !important; } html.kk-has-top, html.kk-has-bot { padding: 0 !important; } }

.kk-bar .fxbar, .kk-prev .fxbar { position: relative; box-sizing: border-box; height: 100%; border-bottom: 1px solid var(--kk-line); background: linear-gradient(90deg, rgba(212, 175, 55, .12), transparent 22%, transparent 78%, rgba(212, 175, 55, .12)), var(--kk-bgp); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.kk-bar.kk-bot .fxbar { border-top: 1px solid var(--kk-line); border-bottom: 0; }
.fxbar-in { display: flex; align-items: center; height: var(--kk-h, 46px); }
.kk-prev .fxbar-in { height: 46px; }
.fxbar-live { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px 0 18px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--kk-gold-hi); background: linear-gradient(90deg, var(--kk-bgp) 75%, transparent); position: relative; z-index: 2; white-space: nowrap; }
.fxbar-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--kk-gold); animation: kkpulse 1.8s infinite; }
@keyframes kkpulse { 0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, .55); } 70% { box-shadow: 0 0 0 9px rgba(212, 175, 55, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } }
.fxbar-vp { flex: 1; min-width: 0; height: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
/* läuft von rechts nach links */
.fxbar-run { display: flex; width: max-content; height: 100%; animation: kkrun var(--dur, 60s) linear infinite; }
.fxbar:hover .fxbar-run, .fxbar:focus-within .fxbar-run { animation-play-state: paused; }
@keyframes kkrun { to { transform: translateX(-50%); } }
.fxbar-set { display: flex; height: 100%; }
.fxi { display: inline-flex; align-items: center; gap: 9px; height: 100%; padding: 0 18px; border: 0; border-right: 1px solid var(--kk-line); background: none; color: var(--kk-fg); font: inherit; cursor: pointer; white-space: nowrap; transition: background .2s; }
.fxi:hover, .fxi:focus-visible { background: rgba(246, 220, 140, .09); outline: none; }
.fxi-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .7rem; font-weight: 700; color: var(--kk-gold-hi); border: 1px solid var(--kk-line2); background: radial-gradient(circle at 30% 30%, rgba(246, 220, 140, .22), rgba(212, 175, 55, .05)); }
.fxi-ic.metal { background: var(--kk-grad); color: var(--kk-on); border-color: transparent; box-shadow: 0 0 12px -3px rgba(212, 175, 55, .7); }
.fxi-t { display: grid; line-height: 1.08; text-align: start; }
.fxi-t b { font-size: .8rem; font-weight: 600; }
.fxi-t small { font-size: .62rem; color: var(--kk-dim); letter-spacing: .04em; }
.fxi-v { font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--kk-gold-hi); }
.fxi-c { font-size: .7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.fxi-c.up { color: var(--kk-gold-hi); }
.fxi-c.down { color: var(--kk-muted); }
.fxbar[data-colors="classic"] .fxi-c.up { color: #3ecf8e; }
.fxbar[data-colors="classic"] .fxi-c.down { color: #f16a6f; }
.fxi.flash .fxi-v { animation: kkflash 1.4s ease; }
@keyframes kkflash { 30% { color: #fff; text-shadow: 0 0 14px rgba(246, 220, 140, .95); } }
.fxbar-time { flex: none; padding: 0 16px 0 10px; font-size: .68rem; color: var(--kk-dim); white-space: nowrap; }
@media (max-width: 620px) {
  .fxbar-in { height: var(--kk-h, 42px); }
  .fxbar-live > span, .fxbar-time { display: none; }
  .fxbar-live { padding: 0 8px 0 14px; }
  .fxi { padding: 0 14px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .fxbar-run { animation: none; } .fxbar-vp { overflow-x: auto; -webkit-mask-image: none; mask-image: none; } .fxbar-set[aria-hidden] { display: none; } }

/* ---------- Verlaufs-Fenster mit Diagramm ---------- */
html.kk-lock { overflow: hidden; }
.kk-modal-bg { position: fixed; inset: 0; z-index: 10000000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: kkfade .2s ease; }
@keyframes kkfade { from { opacity: 0; } }
.kk-modal.chart-modal { position: relative; box-sizing: border-box; width: min(100%, 980px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; display: grid; gap: 16px; text-align: start; justify-items: stretch; padding: 26px; border-radius: 22px; border: 1px solid var(--kk-line2); background: var(--kk-bgp); color: var(--kk-fg); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); outline: none; scrollbar-width: thin; scrollbar-color: #d9a93f rgba(0, 0, 0, .28); }
.kk-modal .kk-x { position: absolute !important; top: 14px; right: 14px; z-index: 3; }
.ch-head { display: flex; align-items: center; gap: 14px; padding-inline-end: 56px; min-width: 0; }
.fxi-ic.big { width: 54px; height: 54px; font-size: 1.05rem; }
.ch-head h2 { margin: 0; font-size: 1.35rem; color: var(--kk-fg); }
.ch-head h2 small { font-size: .78rem; color: var(--kk-dim); font-weight: 600; margin-inline-start: 6px; letter-spacing: .06em; }
.ch-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 4px 0 0; color: var(--kk-muted); font-size: .86rem; }
.ch-now b { font-size: 1.5rem; color: var(--kk-gold-hi); }
.ch-ctrl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.kk-modal .seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 11px; background: var(--kk-surface); border: 1px solid var(--kk-line); }
.kk-modal .seg button { padding: 7px 12px; border-radius: 8px; border: 0; background: none; color: var(--kk-muted); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.kk-modal .seg button[aria-pressed="true"] { background: var(--kk-grad); color: var(--kk-on); }
.ch-opt { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--kk-muted); cursor: pointer; }
.ch-opt input { accent-color: #d4af37; width: 16px; height: 16px; }
.ch-box { position: relative; border-radius: 16px; border: 1px solid var(--kk-line); background: rgba(255, 255, 255, .02); padding: 10px 0 2px; min-height: 120px; touch-action: pan-y; overflow: hidden; }
.ch-svg { display: block; max-width: 100%; height: auto; }
.ch-svg .gl { stroke: rgba(246, 220, 140, .09); }
.ch-svg .zl { stroke: rgba(246, 220, 140, .35); }
.ch-svg text { fill: var(--kk-dim); font-size: 11px; font-family: inherit; }
.ch-svg .yl { text-anchor: end; }
.ch-svg .xl { text-anchor: middle; }
.ch-svg .line { fill: none; stroke: #f6dc8c; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ch-svg .live { fill: #050403; stroke: #f6dc8c; stroke-width: 2.5; }
.ch-svg .hv { stroke: rgba(246, 220, 140, .55); stroke-dasharray: 3 3; }
.ch-svg .hd { fill: #f6dc8c; stroke: #050403; stroke-width: 2; }
.ch-svg .bar { fill: #d4af37; opacity: .8; }
.ch-svg .bar.hot { fill: #f6dc8c; opacity: 1; }
.ch-svg .bar.neg { fill: rgba(246, 220, 140, .32); }
.ch-tip { position: absolute; left: 0; top: 0; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: rgba(17, 15, 11, .96); border: 1px solid var(--kk-line2); display: grid; gap: 2px; font-size: .8rem; white-space: nowrap; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8); z-index: 2; }
.ch-tip[hidden] { display: none; }
.ch-tip b { color: var(--kk-gold-hi); }
.ch-tip small { color: var(--kk-muted); }
.ch-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ch-stats > div { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--kk-line); background: var(--kk-surface); display: grid; gap: 3px; min-width: 0; }
.ch-stats small { color: var(--kk-dim); font-size: .74rem; }
.ch-stats b { color: var(--kk-gold-hi); font-size: 1rem; overflow-wrap: anywhere; }
.ch-note { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--kk-dim); }
.ch-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ch-sub[hidden], .ch-box[hidden], .ch-ip[hidden] { display: none; }
.h3s { font-size: 1.05rem; margin: 0; color: var(--kk-fg); }
.ch-ip { margin: 0; font-size: .88rem; color: var(--kk-muted); line-height: 1.55; }
.ch-ip b { color: var(--kk-gold-hi); }
.ch-srcline { margin: 0; font-size: .8rem; color: var(--kk-dim); line-height: 1.5; overflow-wrap: anywhere; }
.ch-srcline a { color: var(--kk-muted); }
.ch-src summary { cursor: pointer; color: var(--kk-gold-hi); font-weight: 600; font-size: .9rem; }
.ch-src ul { margin: 10px 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: .84rem; }
.ch-src a { color: var(--kk-fg); overflow-wrap: anywhere; }
.ch-src p { font-size: .8rem; }
.ch-empty { padding: 30px; text-align: center; color: var(--kk-muted); margin: 0; }
.kk-modal .muted { color: var(--kk-muted); }
@media (max-width: 620px) {
  .kk-modal-bg { padding: 10px; }
  .kk-modal.chart-modal { padding: 20px 14px; gap: 14px; border-radius: 18px; }
  .ch-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-now b { font-size: 1.25rem; }
  .fxi-ic.big { width: 44px; height: 44px; }
  .ch-head h2 { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { .kk-modal-bg { animation: none; } }
