/* Core visual styles */
.akctsp-wrap{ --bg:#0b0f16; --text:#e6e6e9; --border:#1f2633; --tile-bg:#0f1420; --radius:12px; --gain-rgb:34,197,94; --loss-rgb:239,68,68; --tile-min:120px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell; color:var(--text);
}
.akctsp-wrap[data-theme="light"]{ --bg:#fff; --text:#111827; --border:#e5e7eb; --tile-bg:#f9fafb; }
.akctsp-grid{ display:grid; grid-template-columns: repeat(12,1fr); gap:10px; }
.akctsp-panel{ background:var(--bg); border:1px solid var(--border); border-radius:var(--radius); padding:10px; position:relative; resize:both; overflow:auto; min-height:120px; }
.akctsp-handle{ position:absolute; top:8px; right:8px; display:flex; gap:6px; }
.akctsp-btn{ font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid var(--border); background:rgba(255,255,255,0.05); cursor:pointer; color:var(--text); }
.akctsp-fullscreen{ position:fixed !important; inset:0 !important; z-index:999999 !important; width:100vw !important; height:100vh !important; border-radius:0 !important; margin:0 !important; }
.akctsp-tape{ white-space:nowrap; overflow:hidden; border:1px solid var(--border); border-radius:var(--radius); padding:8px }
.akctsp-list{ display:flex; flex-direction:column; gap:8px; }
.akctsp-card{ border:1px solid var(--border); border-radius:var(--radius); padding:8px; background:var(--tile-bg); }
.akctsp-heatmap{ display:grid; gap:8px; grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr)); }
.akctsp-tile{ border:1px solid var(--border); border-radius:var(--radius); background:var(--tile-bg); padding:8px; position:relative; box-shadow:0 10px 24px rgba(0,0,0,0.32),0 0 0 1px rgba(255,255,255,0.05) inset,0 -2px 0 rgba(0,0,0,0.25) inset; transition:transform 200ms ease, box-shadow 200ms ease, filter 200ms ease; }
.akctsp-wrap:not(.fullscreen) .akctsp-tile:hover{ transform:translateY(-8px) scale(1.015); box-shadow:0 22px 36px rgba(0,0,0,0.52),0 0 0 3px rgba(255,255,255,0.14) inset,0 -3px 0 rgba(0,0,0,0.42) inset; filter:brightness(1.06); }
.akctsp-tile .tk{ font-weight:700; }
.akctsp-tile .sub{ opacity:.8; font-size:12px; }
.akctsp-tile .chg{ font-size:12px; opacity:.9; position:absolute; top:8px; right:10px; }
.akctsp-tile .price{ margin-top:4px; font-size:13px; }
.akctsp-tile.compact{ padding:6px 8px; }
.akctsp-tile.compact .tk{ font-size:14px; }
.akctsp-bubbles{ display:flex; flex-wrap:wrap; gap:10px; }
.akctsp-bubble{ border:1px solid var(--border); border-radius:999px; display:flex; align-items:center; justify-content:center; text-align:center; background:var(--tile-bg); }
.shape-sharp .akctsp-tile, .shape-sharp .akctsp-card{ border-radius:0 !important; }
.shape-circle .akctsp-tile{ border-radius:9999px !important; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; text-align:center; }
.akctsp-settings .akctsp-toolbar label{ display:inline-flex; align-items:center; gap:6px; margin:6px 8px 6px 0; }
.akctsp-settings input, .akctsp-settings select{ background:#0e1522; color:#c8d1e1; border:1px solid #273148; border-radius:10px; padding:6px 8px; }
.w-1{ grid-column: span 6; } .w-2{ grid-column: span 12; } .w-full{grid-column: span 12;}
@media (min-width:1600px){ .w-1{grid-column: span 4;} .w-2{grid-column: span 8;} }

/* Live heatmap */
.akctsp-live-heatmap-wrap{ position:relative; padding:0; margin:0; }
.akctsp-live-heatmap{ position:relative; width:100%; height:68vh; }
.akctsp-live-controls{ position:absolute; right:12px; bottom:12px; top:auto; left:auto; display:flex; gap:10px; z-index:8; justify-content:flex-end; flex-wrap:wrap; }
.akctsp-live-controls .akctsp-btn{ background:rgba(0,0,0,.3); backdrop-filter: blur(10px); cursor:pointer; transition:all 200ms; border-radius:22px; padding:6px 12px; border:1px solid rgba(255,255,255,0.18); box-shadow:0 4px 18px rgba(0,0,0,0.25); }
.akctsp-live-controls .akctsp-btn:hover{ background:rgba(0,0,0,.45); opacity:1; }
.akctsp-live-version{ position:absolute; right:12px; top:12px; left:auto; bottom:auto; font-size:12px; font-weight:700; padding:4px 8px; border-radius:999px; background:rgba(0,0,0,.35); backdrop-filter: blur(6px); border:1px solid rgba(255,255,255,0.1); color:var(--text); z-index:9; box-shadow:0 4px 18px rgba(0,0,0,0.25); }
.akctsp-svg{ width:100%; height:100%; display:block; }
.akctsp-live-legend{ position:absolute; left:12px; bottom:12px; right:auto; top:auto; background:rgba(0,0,0,.65); backdrop-filter:blur(8px); padding:5px 7px; border-radius:8px; font-size:11px; line-height:1.2; border:1px solid rgba(255,255,255,0.12); display:flex; flex-direction:column; gap:3px; box-shadow:0 4px 18px rgba(0,0,0,0.25); }
.akctsp-live-legend .akctsp-legend-sort{ display:block; font-size:10px; margin-top:2px; opacity:0.85; }
.akctsp-live-full{ position:absolute; right:8px; top:8px; z-index:5; }
.akctsp-live-heatmap-wrap.fullwindow{ position:fixed; top:0; left:0; width:100%; height:100%; background:var(--bg); border-radius:0; padding:0; margin:0; z-index:99999; }
.akctsp-live-heatmap-wrap.fullwindow .akctsp-svg{ height:100%; }
.akctsp-live-heatmap-wrap.fullwindow .akctsp-live-controls{ position:fixed; right:12px; left:auto; bottom:12px; top:auto; transform:none; justify-content:flex-end; flex-wrap:wrap; }
.akctsp-live-heatmap-wrap.fullwindow .akctsp-live-legend{ position:fixed; left:12px; bottom:12px; right:auto; top:auto; }
.akctsp-live-heatmap-wrap.fullwindow .akctsp-live-version{ position:fixed; right:12px; top:12px; left:auto; bottom:auto; }
.akctsp-live-heatmap-wrap.fullscreen{ position:fixed; inset:0; width:100vw; height:100vh; background:var(--bg); border-radius:0; padding:0; margin:0; z-index:999999; }
.akctsp-live-heatmap-wrap.fullscreen .akctsp-svg{ height:100vh; }

/* Color picker panel for live heatmap */
.akctsp-color-panel{ position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); z-index:100001; background:#1a2332; padding:20px; border-radius:12px; border:1px solid rgba(255,255,255,0.12); box-shadow:0 20px 60px rgba(0,0,0,0.9); color:#f0f4f8; width:420px; max-width:90vw; font-size:13px; }
.akctsp-color-panel.akctsp-overlay{ background:#1a2332; backdrop-filter:blur(10px); }
.akctsp-color-panel-inner{ display:flex; flex-direction:column; gap:14px; }
.akctsp-color-title{ font-size:14px; font-weight:700; color:#f0f4f8; letter-spacing:0.5px; text-transform:uppercase; }
.akctsp-color-row{ display:grid; grid-template-columns: 70px 1fr; gap:10px; align-items:center; }
.akctsp-color-label{ font-size:11px; color:#cbd5e1; font-weight:600; }
.akctsp-color-hex{ font-size:10px; font-family:'Courier New',monospace; background:rgba(255,255,255,0.04); padding:4px 6px; border-radius:4px; color:#cbd5e1; border:1px solid rgba(255,255,255,0.08); text-align:center; }
.akctsp-color-swatch{ width:20px; height:20px; border-radius:4px; border:1px solid rgba(255,255,255,0.15); flex-shrink:0; }
.akctsp-color-panel input[type="color"]{ width:40px; height:32px; border:0; padding:2px; background:transparent; cursor:pointer; -webkit-appearance:none; border-radius:6px; flex-shrink:0; position:relative; z-index:100003; }
.akctsp-color-panel input[type="color"]::-webkit-color-swatch{ border:2px solid rgba(255,255,255,0.15); border-radius:5px; box-shadow:inset 0 1px 2px rgba(255,255,255,0.1); }
.akctsp-color-panel .akctsp-color-gain,
.akctsp-color-panel .akctsp-color-loss,
.akctsp-color-panel .akctsp-text-color{ position:relative; z-index:100003; }
.akctsp-color-actions{ display:flex; gap:8px; justify-content:flex-end; flex-wrap:nowrap; }
.akctsp-color-apply, .akctsp-color-cancel{ padding:8px 16px; border-radius:8px; border:1px solid rgba(255,255,255,0.1); background:rgba(59,130,246,0.2); color:#f0f4f8; cursor:pointer; font-size:12px; font-weight:600; transition:all 180ms cubic-bezier(0.2,0.6,0.3,1); flex-shrink:0; }
.akctsp-color-cancel{ background:rgba(255,255,255,0.05); }
.akctsp-color-apply:hover{ background:rgba(59,130,246,0.35); border-color:rgba(59,130,246,0.4); transform:translateY(-1px); }
.akctsp-color-cancel:hover{ background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.15); transform:translateY(-1px); }
.akctsp-color-panel input[type="color"]:focus{ outline:2px solid rgba(59,130,246,0.6); box-shadow:0 0 0 4px rgba(59,130,246,0.2); position:relative; z-index:100003; }
.akctsp-color-panel select.akctsp-text-mode{ background:rgba(255,255,255,0.05); color:#f0f4f8; border:1px solid rgba(255,255,255,0.12); border-radius:6px; padding:6px 10px; font-size:12px; cursor:pointer; min-width:70px; font-weight:500; transition:all 150ms ease; flex-shrink:0; position:relative; z-index:100002; }
.akctsp-color-panel select.akctsp-text-mode:hover{ background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.18); }
.akctsp-color-panel select.akctsp-text-mode:focus{ outline:2px solid rgba(59,130,246,0.6); background:rgba(255,255,255,0.08); }
.akctsp-color-panel select.akctsp-text-mode option{ background:#1a2332; color:#f0f4f8; }
.akctsp-color-panel .akctsp-btn{ background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.12); color:#cbd5e1; padding:6px 10px; font-size:11px; border-radius:6px; font-weight:600; transition:all 180ms cubic-bezier(0.2,0.6,0.3,1); white-space:nowrap; flex-shrink:0; }
.akctsp-color-panel .akctsp-btn:hover{ background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.2); color:#f0f4f8; }
.akctsp-color-panel .akctsp-btn.bg-dark, .akctsp-color-panel .akctsp-btn.bg-light, .akctsp-color-panel .akctsp-btn.bg-custom{ transition:all 180ms ease; }
.akctsp-color-panel .akctsp-btn.active{ background:rgba(59,130,246,0.4); border-color:rgba(59,130,246,0.5); color:#f0f4f8; box-shadow:0 0 12px rgba(59,130,246,0.25); }
.akctsp-color-panel .akctsp-bg-custom-row{ gap:8px; display:flex; align-items:center; flex-wrap:nowrap; }
.akctsp-color-panel .akctsp-bg-color{ position:relative; z-index:100002; }
.akctsp-color-panel .akctsp-bg-custom-row .akctsp-color-hex{ margin-left:0; position:relative; z-index:100002; }


/* Perf hints */
/* will-change auf rect/text entfernt: pro Kachel eine Compositor-Ebene ist
   bei hunderten Kacheln kontraproduktiv (Layer-Speicher + Layerize-Kosten
   bei jedem Redraw). Die No-Op-Write-Guards im JS tragen jetzt die Perf. */
.akctsp-bubble { will-change: transform; transform: translateZ(0); }

/* Light-style for the live heatmap area */
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-light{
  --bg: #ffffff;
  --tile-bg: #f9fafb;
  --text: #111827;
  --border: #e5e7eb;
  --gain-rgb: 34,197,94;
  --loss-rgb: 239,68,68;
  background: var(--tile-bg);
  color: var(--text);
}
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-light .akctsp-live-controls .akctsp-btn{ background: rgba(0,0,0,0.25); color: var(--text); border: 1px solid rgba(0,0,0,0.15); backdrop-filter: blur(8px); }
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-light .akctsp-live-legend{ background: rgba(255,255,255,0.9); color: var(--text); border: 1px solid var(--border); }
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-light .akctsp-live-version{ background: rgba(255,255,255,0.85); color: var(--text); border: 1px solid var(--border); }
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-light .akctsp-svg{ background: var(--tile-bg); }
.akctsp-live-heatmap-wrap .akctsp-svg{ display:block; background: var(--tile-bg); }

/* Custom background mode uses the --tile-bg vars set inline by JS */
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-custom{
  background: var(--tile-bg);
  color: var(--text);
}
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-custom .akctsp-live-controls .akctsp-btn{ background: rgba(0,0,0,0.25); color: var(--text); border: 1px solid rgba(0,0,0,0.15); backdrop-filter: blur(8px); }
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-custom .akctsp-live-legend{ background: rgba(255,255,255,0.95); color: var(--text); border: 1px solid var(--border); }
.akctsp-live-heatmap-wrap.akctsp-live-heatmap-custom .akctsp-live-version{ background: rgba(255,255,255,0.9); color: var(--text); border: 1px solid var(--border); }

/* Hover tooltip for heatmap tiles */
.akctsp-tooltip{ position:fixed; z-index:100000; pointer-events:none; background:rgba(7,11,19,0.96); color:#f8fafc; border:1px solid rgba(255,255,255,0.12); box-shadow:0 14px 38px rgba(0,0,0,0.45); border-radius:10px; padding:10px 12px; font-size:12px; line-height:1.45; max-width:260px; backdrop-filter:blur(6px); }
.akctsp-tooltip .akctsp-tt-symbol{ font-size:13px; font-weight:700; letter-spacing:0.2px; margin-bottom:4px; display:flex; gap:8px; align-items:center; }
.akctsp-tooltip .akctsp-tt-logo{ display:flex; align-items:center; justify-content:center; flex-shrink:0; width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12); }
.akctsp-tooltip .akctsp-tt-logo img{ width:28px; height:28px; border-radius:50%; object-fit:contain; }
.akctsp-tooltip .akctsp-tt-logo span{ display:flex; align-items:center; justify-content:center; width:28px; height:28px; font-size:12px; font-weight:700; color:rgba(255,255,255,0.6); }
.akctsp-tooltip .akctsp-tt-chip{ display:inline-block; padding:2px 6px; border-radius:999px; font-size:11px; border:1px solid rgba(255,255,255,0.16); background:rgba(255,255,255,0.08); }
.akctsp-tooltip .akctsp-tt-row{ display:flex; justify-content:space-between; gap:12px; margin:2px 0; }
.akctsp-tooltip .akctsp-tt-label{ opacity:0.75; }
.akctsp-tooltip .akctsp-tt-value{ font-weight:600; }
.akctsp-tooltip .akctsp-tt-chart{ margin:6px 0; }
.akctsp-tooltip .akctsp-tt-chart-svg{ width:100%; height:auto; display:block; }
.akctsp-tt-sparkline{margin:8px 0 8px -2px;width:240px;background:rgba(0,0,0,.5);border-radius:4px;padding:3px;display:block}.akctsp-tt-sparkline svg{display:block;width:100%;height:auto;background:rgba(0,0,0,.3);border-radius:3px;overflow:visible}.akctsp-tt-sparkline polyline{stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 1px rgba(0,0,0,.5))}

/* Coin-Logo in den Heatmap-Kacheln klein halten.
   Die Bilder hatten nie eine Groessenregel — das fiel nur nicht auf, weil die
   Platzhalterdatei fehlte und die Bilder darum 0px gross blieben. Seit sie
   laden (11.08.2026), rendern sie sonst in Originalgroesse und sprengen die
   Kachel. */
.tile-logo {
	display: inline-block;
	width: 14px;
	height: 14px;
	max-width: 14px;
	max-height: 14px;
	margin-right: 4px;
	vertical-align: -2px;
	flex: 0 0 14px;
	object-fit: contain;
	border-radius: 50%;
}
