/* =============================================================
   SQVD SUMMARY — valuation_summary.css
   Split-layout: bal panel (metrika táblák) + jobb panel (grafikon)
   Hozzáadni a valuation.css VÉGÉRE, vagy önálló fájlként betölteni.
   ============================================================= */


/* ---------------------------------------------------------------
   WRAPPER — teljes munkaterület
--------------------------------------------------------------- */

.sqvd-summary-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0d1117;
  overflow: hidden;
  box-sizing: border-box;
}


/* ---------------------------------------------------------------
   FEJLÉC SÁV — ticker, cég neve, warnings badge, évoszlop vezérlők
--------------------------------------------------------------- */

.sqvd-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 38px;
  min-height: 38px;
  background: #161b22;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.sqvd-summary-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sqvd-summary-ticker {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: .04em;
}

.sqvd-summary-company {
  font-size: 11px;
  color: var(--muted);
}

.sqvd-summary-warnings-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid;
}

.sqvd-summary-warnings-badge.ok {
  color: var(--green);
  border-color: rgba(63, 185, 80, .35);
  background: rgba(63, 185, 80, .08);
}

.sqvd-summary-warnings-badge.warning {
  color: #f2cc60;
  border-color: rgba(242, 204, 96, .35);
  background: rgba(242, 204, 96, .08);
}

/* Évoszlop vezérlők (pipák: 3Y / 5Y) */
.sqvd-summary-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sqvd-summary-year-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.sqvd-summary-year-toggle input[type="checkbox"] {
  accent-color: #58a6ff;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.sqvd-summary-year-toggle:hover {
  color: var(--text);
}


/* ---------------------------------------------------------------
   BODY — bal + jobb panel
--------------------------------------------------------------- */

.sqvd-summary-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}


/* Húzható elválasztó bal és jobb panel között */
.sqvd-summary-resizer {
  width: 5px;
  min-width: 5px;
  flex-shrink: 0;
  background: var(--border);
  cursor: col-resize;
  transition: background .15s;
  position: relative;
  z-index: 10;
}

.sqvd-summary-resizer:hover,
.sqvd-summary-resizer.dragging {
  background: #58a6ff;
}




/* ---------------------------------------------------------------
   BAL PANEL — görgethető metrika lista szekciónként
--------------------------------------------------------------- */



.sqvd-summary-left {
  width: 460px;
  min-width: 320px;
  max-width: 70%;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: auto;
  background: #0d1117;
  padding: 8px 0;
}  

/* Szekció blokk */
.sqvd-summary-section {
  margin-bottom: 4px;
}

/* Szekció cím sor */


.sqvd-summary-section-title {
  display: flex;
  align-items: center;
  height: 24px;
  background: #0d1117;
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid rgba(255,255,255,.04);
  min-width: max-content;
}

.sqvd-summary-section-title-fixed {
  font-size: 10px;
  font-weight: 900;
  color: #58a6ff;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  background: #0d1117;
  position: sticky;
  left: 0;
  z-index: 3;
  width: 210px;
  min-width: 210px;
  flex-shrink: 0;
  white-space: nowrap;
}  

/* Metrika sor */

.sqvd-summary-row {
  display: flex;
  align-items: center;
  padding: 0;
  height: 28px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  cursor: pointer;
  transition: background .1s;
  min-width: max-content;
}  


.sqvd-summary-row-fixed {
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0d1117;
  padding: 0 4px 0 12px;
  flex-shrink: 0;
  width: 210px;
  min-width: 210px;
}

.sqvd-summary-row.selected .sqvd-summary-row-fixed {
  background: rgba(13, 17, 23, 0.98);
}

.sqvd-summary-row:hover .sqvd-summary-row-fixed {
  background: rgba(13, 24, 36, 0.98);
}


.sqvd-summary-row:hover {
  background: rgba(88, 166, 255, .06);
}

/* Bejelölt sor (grafikon checkbox be van pipálva) */
.sqvd-summary-row.selected {
  background: rgba(88, 166, 255, .10);
}

/* Checkbox a grafikon hozzáadásához */
.sqvd-summary-row-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #58a6ff;
  cursor: pointer;
  margin-right: 8px;
}

/* Sor neve */


/* A betűméretet a közös valuation_text_size.js állítja (html[data-sqvd-text]).
   A változók a valuation.css betűméret-blokkjában vannak definiálva.
   CSAK az adattartalom skálázódik (sor neve, értékcella, évszám-fejléc) —
   a chart-vezérlők és a legend fix méretűek maradnak. */
.sqvd-summary-row-label {
  font-size: var(--sqvd-summary-font, 11px);
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}  

.sqvd-summary-row.selected .sqvd-summary-row-label {
  background: rgba(13, 17, 23, 1);
}  

.sqvd-summary-row.selected .sqvd-summary-row-label {
  color: #c9d1d9;
}

/* Értékoszlopok konténere */
.sqvd-summary-row-values {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

/* Egyetlen értékcella */
.sqvd-summary-val {
  width: 72px;
  text-align: right;
  font-size: var(--sqvd-summary-font, 11px);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  padding-right: 4px;
}

/* Current (legfrissebb) oszlop — kiemelt */
.sqvd-summary-val.current {
  font-weight: 700;
  color: #e6edf3;
}

/* Hiányzó érték */
.sqvd-summary-val.empty {
  color: var(--muted);
}

/* Fejléc sor az értékoszlopokhoz (évszámok) */
.sqvd-summary-col-header {
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 22px;
  border-bottom: 1px solid var(--border);
  background: #0f141b;
  position: sticky;
  
  top: 0;
  z-index: 4;
}



.sqvd-summary-col-header-spacer {
  width: 210px;
  min-width: 210px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  background: #0f141b;
  z-index: 2;
}  

.sqvd-summary-col-header-values {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sqvd-summary-col-year {
  width: 72px;
  text-align: right;
  font-size: var(--sqvd-summary-head, 10px);
  font-weight: 700;
  color: var(--muted);
  padding-right: 4px;
  letter-spacing: .04em;
}

.sqvd-summary-col-year.current {
  color: #58a6ff;
}

/* Szín kód a grafikonon szereplő metrikához */
.sqvd-summary-row-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 6px;
  opacity: 0;
  transition: opacity .15s;
}

.sqvd-summary-row.selected .sqvd-summary-row-color-dot {
  opacity: 1;
}


/* ---------------------------------------------------------------
   JOBB PANEL — grafikon + vezérlők
--------------------------------------------------------------- */

.sqvd-summary-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0d1117;
  overflow: hidden;
}

/* Grafikon toolbar (chart típus, tengely vezérlők) */
.sqvd-summary-chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 34px;
  min-height: 34px;
  background: #161b22;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.sqvd-summary-chart-toolbar-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Chart típus gombok (Line / Bar) */
.sqvd-summary-chart-type-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  letter-spacing: .04em;
  transition: background .1s, color .1s;
}

.sqvd-summary-chart-type-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.2);
}

.sqvd-summary-chart-type-btn.active {
  background: #1565C0;
  border-color: #1565C0;
  color: #fff;
}

/* Dual tengely pipa */
.sqvd-summary-dual-axis-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin-left: auto;
}

.sqvd-summary-dual-axis-toggle input[type="checkbox"] {
  accent-color: #58a6ff;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.sqvd-summary-dual-axis-toggle:hover {
  color: var(--text);
}

/* Legenda a grafikonon szereplő metrikákhoz */
.sqvd-summary-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 12px;
  min-height: 24px;
  background: #0d1117;
  border-bottom: 1px solid rgba(255,255,255,.04);
  flex-shrink: 0;
}

.sqvd-summary-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
}

.sqvd-summary-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Grafikon konténer — TradingView Lightweight Charts itt renderel */
.sqvd-summary-chart-container {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  background: #0d1117;
}

/* Üres állapot — ha nincs bejelölt metrika */
.sqvd-summary-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.sqvd-summary-chart-empty-icon {
  font-size: 28px;
  opacity: .3;
}


/* ---------------------------------------------------------------
   RESZPONZIVITÁS — keskeny ablak esetén bal panel összecsukódik
--------------------------------------------------------------- */

@media (max-width: 900px) {
  .sqvd-summary-left {
    width: 280px;
    min-width: 220px;
  }

  .sqvd-summary-val {
    width: 58px;
  }

  .sqvd-summary-col-year {
    width: 58px;
  }
}
