/* =========================================
   style.new-marktpuls.css — CI 2026 rev.3
   Basiert auf echtem marktpuls.html Template
   Scope: .theme-new
   ========================================= */

/* ════════════════════════════════════════
   INFO-ICONS (Tabellen-Header + Detail-Modal)
   Eigene Regel statt Bootstrap text-muted, damit im Dark-Mode
   die kleinen Glyphen ausreichend Kontrast haben.
   ════════════════════════════════════════ */
.theme-new .mp-info {
  color: var(--skw-text) !important;   /* schlaegt Bootstrap .text-muted !important */
  opacity: 0.55;
  cursor: help;
  transition: opacity var(--skw-dur-fast) var(--skw-ease),
              color var(--skw-dur-fast) var(--skw-ease);
}
.theme-new .mp-info:hover {
  opacity: 1;
  color: var(--skw-accent) !important;
}

/* ════════════════════════════════════════
   PAGE LAYOUT
   ════════════════════════════════════════ */

.theme-new .mp-page {
  font-family: var(--skw-font);
}

.theme-new .mp-page-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--skw-border);
}

.theme-new .mp-page-header h1 {
  font-family: var(--skw-font);
  font-size: var(--skw-fs-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--skw-ink);
  margin-bottom: 4px;
}

.theme-new .mp-page-card {
  background: var(--skw-surface);
  border: 1px solid var(--skw-border);
  border-radius: var(--skw-radius-lg);
  box-shadow: var(--skw-shadow-sm);
  padding: 0;
  overflow: hidden;
}

/* Tabs-Bar: Tabs links, Collection-Toggle rechts */
.theme-new .mp-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 12px;
  background: var(--skw-surface-2);
  border-bottom: 1px solid var(--skw-border);
}

.theme-new .mp-tabs-bar .nav-tabs {
  border-bottom: none;
  flex: 1;
  margin: 0;
}

.theme-new .mp-tabs-bar .nav-tabs .nav-link {
  border: none;
  background: transparent;
  color: var(--skw-text-muted);
  font-family: var(--skw-font);
  font-size: var(--skw-fs-small);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: color var(--skw-dur-fast), border-color var(--skw-dur-fast);
}

.theme-new .mp-tabs-bar .nav-tabs .nav-link:hover {
  color: var(--skw-ink);
  border-bottom-color: var(--skw-border-strong);
}

.theme-new .mp-tabs-bar .nav-tabs .nav-link.active {
  color: var(--skw-accent) !important;
  background: transparent !important;
  border-bottom-color: var(--skw-accent) !important;
  font-weight: 700;
}

/* Anzahl-Badge im Tab — neutral Grau, nicht Bootstrap-bg-secondary-Grün */
.theme-new .mp-tab-count {
  background: var(--skw-surface) !important;
  color: var(--skw-text-muted) !important;
  font-family: var(--skw-font);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--skw-border);
  vertical-align: middle;
}

.theme-new .mp-tabs-bar .nav-link.active .mp-tab-count {
  background: var(--skw-accent) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Collection-Toggle rechts in der Tabs-Bar */
.theme-new .mp-collection-toggle .form-check-label {
  font-family: var(--skw-font);
  font-size: var(--skw-fs-small);
  font-weight: 600;
  color: var(--skw-text-muted);
  cursor: pointer;
}

.theme-new .mp-collection-toggle .form-check-input:checked {
  background-color: var(--skw-accent);
  border-color: var(--skw-accent);
}

.theme-new .mp-page-card > .tab-content {
  padding: 16px;
}

/* Hilfe-Icon neben H1 */
.theme-new .mp-help-link {
  color: var(--skw-text-muted);
  font-size: 1rem;
  margin-left: 6px;
  vertical-align: middle;
  text-decoration: none;
  transition: color var(--skw-dur-fast);
}
.theme-new .mp-help-link:hover { color: var(--skw-accent); }

/* ── Dark ── */
[data-bs-theme="dark"] .theme-new .mp-page-card { background: var(--skw-surface); border-color: var(--skw-border); }
[data-bs-theme="dark"] .theme-new .mp-page-card > .nav-tabs { background: var(--skw-surface-2); }


/* ════════════════════════════════════════
   ZEITFENSTER-TOGGLE (.mp-page-window-switch)
   Echtes HTML: .mp-page-window-switch > .btn.active
   ════════════════════════════════════════ */

.theme-new .mp-page-window-switch {
  display: inline-flex;
  background: var(--skw-surface-2);
  border-radius: var(--skw-radius);
  padding: 3px;
  gap: 2px;
}

.theme-new .mp-page-window-switch .btn {
  font-family: var(--skw-font);
  font-size: var(--skw-fs-small);
  font-weight: 600;
  padding: 6px 14px;
  border: none;
  border-radius: var(--skw-radius-sm);
  background: transparent;
  color: var(--skw-text-muted);
  transition: all var(--skw-dur-fast) var(--skw-ease);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.theme-new .mp-page-window-switch .btn.active {
  background: var(--skw-accent) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: var(--skw-shadow-sm);
}

.theme-new .mp-page-window-switch .btn:hover:not(.active) {
  color: var(--skw-ink);
  background: rgba(0,0,0,0.04);
}

/* Modal-interner Window-Switch (.mp-window-switch) — gleiche Optik */
.theme-new .mp-window-switch {
  display: inline-flex;
  background: var(--skw-surface-2);
  border-radius: var(--skw-radius-sm);
  padding: 2px;
  gap: 2px;
}
.theme-new .mp-window-switch .btn,
.theme-new .mp-detail-w {
  font-family: var(--skw-font);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--skw-text-muted);
  cursor: pointer;
  transition: all var(--skw-dur-fast);
}
.theme-new .mp-window-switch .btn.active,
.theme-new .mp-detail-w.active {
  background: var(--skw-accent) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: var(--skw-shadow-xs);
}

/* ── Dark ── */
[data-bs-theme="dark"] .theme-new .mp-page-window-switch { background: var(--skw-surface-2); }
[data-bs-theme="dark"] .theme-new .mp-page-window-switch .btn.active { background: var(--skw-surface); }


/* ════════════════════════════════════════
   AKTIVITAETS-FARBEN — als CSS-Vars, damit JS sie via getComputedStyle
   konsistent zur CSS-Theme einliest (Indigo / Grau / Cyan)
   ════════════════════════════════════════ */

.theme-new {
  --mp-color-neu:     var(--skw-accent);       /* Indigo — neue Listings */
  --mp-color-bestand: var(--skw-text-muted);   /* Grau   — bleibt im Markt */
  --mp-color-abgang:  var(--skw-data);         /* Cyan   — verschwunden */
}

/* ════════════════════════════════════════
   LEGENDE (.mp-legend, .mp-legend-dot)
   ════════════════════════════════════════ */

.theme-new .mp-legend {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11px;
  color: var(--skw-text-muted);
  font-family: var(--skw-font);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.theme-new .mp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.theme-new .mp-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Mini-Legend-Strip ueber der Tabelle (semantisch nah an der Aktivitaets-Spalte) */
.theme-new .mp-table-legend {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 0;
  background: var(--skw-surface);
}


/* ════════════════════════════════════════
   MARKTPULS-TABELLE
   Echtes HTML: table.table.table-sm.marktpuls-table
   tbody tr.marktpuls-row
   ════════════════════════════════════════ */

.theme-new table.marktpuls-table {
  font-family: var(--skw-font);
  font-size: var(--skw-fs-small);
  border-collapse: separate;
  border-spacing: 0;
}

/* Filter-Row im thead */
.theme-new table.marktpuls-table thead tr.filter-row th {
  padding-top: 4px;
  padding-bottom: 6px;
  background: var(--skw-surface-2);
}

.theme-new table.marktpuls-table thead tr.filter-row .filter-input {
  font-size: 11px;
  font-family: var(--skw-font);
  border: 1.5px solid var(--skw-border);
  border-radius: var(--skw-radius-sm);
  background: var(--skw-surface);
  color: var(--skw-text);
  padding: 4px 8px;
  -moz-appearance: textfield;
}
/* Browser-eigene Spinner der number-inputs entfernen — kollidieren sonst optisch
   mit den Sortier-Pfeilen im th darueber */
.theme-new table.marktpuls-table thead tr.filter-row .filter-input::-webkit-inner-spin-button,
.theme-new table.marktpuls-table thead tr.filter-row .filter-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.theme-new table.marktpuls-table thead tr.filter-row .filter-input:focus {
  border-color: var(--skw-accent);
  box-shadow: 0 0 0 2px rgba(99,102,241,0.12);
  outline: none;
}

/* Spalten-Header */
.theme-new table.marktpuls-table thead tr:first-child th {
  font-size: var(--skw-fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--skw-text-muted);
  border-bottom: 2px solid var(--skw-border);
  background: var(--skw-surface-2);
  padding: 9px 10px;
  white-space: nowrap;
}

/* Sortierbare Spalten — Idle-Doppelpfeil ⇅ in muted, aktiv ↑/↓ in Cyan */
.theme-new table.marktpuls-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 24px !important;
}
.theme-new table.marktpuls-table th.sortable::after {
  content: '⇅';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--skw-text-muted);
  opacity: 0.45;
  transition: opacity var(--skw-dur-fast), color var(--skw-dur-fast);
  line-height: 1;
}
.theme-new table.marktpuls-table th.sortable:hover { color: var(--skw-ink); }
.theme-new table.marktpuls-table th.sortable:hover::after { opacity: 0.85; }
.theme-new table.marktpuls-table th.sort-asc::after  { content: '↑'; color: var(--skw-data); opacity: 1; }
.theme-new table.marktpuls-table th.sort-desc::after { content: '↓'; color: var(--skw-data); opacity: 1; }

/* Zeilen */
.theme-new table.marktpuls-table tbody tr.marktpuls-row {
  transition: background var(--skw-dur-fast);
}
.theme-new table.marktpuls-table tbody tr.marktpuls-row:hover {
  background: var(--skw-surface-2);
}

.theme-new table.marktpuls-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--skw-border);
  color: var(--skw-text);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* Delta Farben (Bootstrap text-success/text-danger) */
.theme-new table.marktpuls-table .text-success { color: var(--skw-success) !important; }
.theme-new table.marktpuls-table .text-danger  { color: var(--skw-danger)  !important; }

/* Reihe Num-Zelle */
.theme-new table.marktpuls-table .row-num {
  font-size: 11px;
  color: var(--skw-text-soft);
  font-variant-numeric: tabular-nums;
}

/* Insufficient-Zeile */
.theme-new table.marktpuls-table tr.mp-insufficient td {
  color: var(--skw-text-soft);
  font-style: italic;
}

/* ── Dark ── */
[data-bs-theme="dark"] .theme-new table.marktpuls-table thead tr:first-child th { background: var(--skw-surface-2); }
[data-bs-theme="dark"] .theme-new table.marktpuls-table thead tr.filter-row th { background: var(--skw-surface-2); }
[data-bs-theme="dark"] .theme-new table.marktpuls-table thead tr.filter-row .filter-input { background: var(--skw-surface); border-color: var(--skw-border); color: var(--skw-text); }
[data-bs-theme="dark"] .theme-new table.marktpuls-table tbody td { border-color: var(--skw-border); color: var(--skw-text); }
[data-bs-theme="dark"] .theme-new table.marktpuls-table tbody tr.marktpuls-row:hover { background: var(--skw-surface-2); }


/* ════════════════════════════════════════
   THUMBNAILS (.mp-thumb, .mp-thumb-placeholder)
   ════════════════════════════════════════ */

.theme-new .mp-thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.theme-new .mp-thumb-placeholder {
  width: 40px;
  height: 40px;
  background: var(--skw-surface-2);
  border: 1px solid var(--skw-border);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--skw-text-soft);
  flex-shrink: 0;
}

/* ── Dark ── */
[data-bs-theme="dark"] .theme-new .mp-thumb-placeholder { background: var(--skw-surface-2); border-color: var(--skw-border); }


/* ════════════════════════════════════════
   AKTIONS-SPALTE (.mp-actions)
   .mp-star, .mp-star.is-active
   .mp-detail
   ════════════════════════════════════════ */

.theme-new .mp-actions {
  white-space: nowrap;
}

.theme-new .mp-star {
  color: var(--skw-text-soft);
  transition: color var(--skw-dur-fast), transform var(--skw-dur-fast);
  padding: 2px !important;
}
.theme-new .mp-star:hover { color: var(--skw-warning); transform: scale(1.2); }
.theme-new .mp-star.is-active { color: var(--skw-warning) !important; }

.theme-new .mp-detail {
  color: var(--skw-text-muted);
  transition: color var(--skw-dur-fast);
  padding: 2px !important;
}
.theme-new .mp-detail:hover { color: var(--skw-accent); }


/* ════════════════════════════════════════
   MEHR LADEN (.load-more)
   ════════════════════════════════════════ */

.theme-new .load-more {
  font-family: var(--skw-font);
  font-weight: 600;
  font-size: var(--skw-fs-small);
  border-radius: var(--skw-radius);
  border: 1.5px solid var(--skw-border-strong);
  background: transparent;
  color: var(--skw-text-muted);
  transition: all var(--skw-dur-fast);
  padding: 7px 20px;
}
.theme-new .load-more:hover {
  border-color: var(--skw-accent);
  color: var(--skw-accent);
  background: rgba(99,102,241,0.05);
}


/* ════════════════════════════════════════
   MARKTPULS-ZÄHLER (.marktpuls-count)
   ════════════════════════════════════════ */

.theme-new .marktpuls-count {
  font-size: var(--skw-fs-label);
  font-weight: 600;
  color: var(--skw-text-muted);
  font-variant-numeric: tabular-nums;
}


/* ════════════════════════════════════════
   DETAIL-MODAL (.mp-detail-modal)
   ════════════════════════════════════════ */

.theme-new .mp-detail-modal .modal-content {
  border-radius: var(--skw-radius-xl);
  border: 1px solid var(--skw-border);
  box-shadow: var(--skw-shadow-lg);
  overflow: hidden;
}

.theme-new .mp-detail-modal .modal-header {
  background: #0F0F23;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 14px 18px;
}

.theme-new .mp-detail-modal .modal-title {
  font-family: var(--skw-font);
  font-weight: 700;
  font-size: var(--skw-fs-body);
  color: #fff;
}

.theme-new .mp-detail-modal .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.6;
}

.theme-new .mp-detail-modal .modal-body {
  padding: 18px;
}


/* ════════════════════════════════════════
   DATEN-STAND (.mp-stand)
   ════════════════════════════════════════ */

.theme-new .mp-stand {
  font-size: 11px;
  color: var(--skw-text-soft);
  font-style: italic;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--skw-surface-2);
  border-radius: var(--skw-radius-sm);
}


/* ════════════════════════════════════════
   HERO / STATS im Detail-Modal
   .mp-hero, .mp-hero-img
   .mp-stats-grid, .mp-stat-tile, .mp-stat-label, .mp-stat-value, .is-accent
   ════════════════════════════════════════ */

.theme-new .mp-hero {
  background: var(--skw-surface-2);
  border-radius: var(--skw-radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.theme-new .mp-hero-img {
  max-height: 100px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 8px;
}

.theme-new .mp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.theme-new .mp-stat-tile {
  background: var(--skw-surface);
  border: 1px solid var(--skw-border);
  border-radius: var(--skw-radius);
  padding: 10px 12px;
  text-align: center;
}

.theme-new .mp-stat-tile.is-accent {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.06);
}

.theme-new .mp-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--skw-text-muted);
  margin-bottom: 4px;
  display: block;
}

.theme-new .mp-stat-value {
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--skw-ink);
}

.theme-new .mp-stat-tile.is-accent .mp-stat-value {
  color: var(--skw-accent);
}

/* ── Dark ── */
[data-bs-theme="dark"] .theme-new .mp-hero { background: var(--skw-surface-2); }
[data-bs-theme="dark"] .theme-new .mp-stat-tile { background: var(--skw-surface); border-color: var(--skw-border); }
[data-bs-theme="dark"] .theme-new .mp-stat-value { color: var(--skw-ink); }


/* ════════════════════════════════════════
   CHART-CARDS (.mp-chart-card, .mp-chart-sub)
   ════════════════════════════════════════ */

.theme-new .mp-chart-card {
  background: var(--skw-surface);
  border: 1px solid var(--skw-border);
  border-radius: var(--skw-radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.theme-new .mp-chart-card h6 {
  font-family: var(--skw-font);
  font-size: var(--skw-fs-small);
  font-weight: 700;
  color: var(--skw-ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-new .mp-chart-sub {
  font-size: 11px;
  color: var(--skw-text-soft);
  font-weight: 400;
}

/* ── Dark ── */
[data-bs-theme="dark"] .theme-new .mp-chart-card { background: var(--skw-surface); border-color: var(--skw-border); }
[data-bs-theme="dark"] .theme-new .mp-chart-card h6 { color: var(--skw-ink); }


/* ════════════════════════════════════════
   PREMIUM-BADGE im Marktpuls
   ════════════════════════════════════════ */

.theme-new .mp-page-header .badge.bg-warning {
  background: var(--skw-warning) !important;
  color: var(--skw-ink) !important;
  font-family: var(--skw-font);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
