/* ==========================================================================
   ps_compare.css -- Styles for power_stations_comparison_chart.html only.
   Requires dsp_site.css to be loaded first (depends on :root variables).
   ========================================================================== */

/* ── PAGE LAYOUT ── */
.tbl-page        { padding: 18px 0 40px; }
.tbl-page-head   { padding: 0 28px 14px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tbl-page-title  { font-family: var(--fh); font-size: 24px; font-weight: 800; color: var(--txt); }
.tbl-page-count  { font-family: var(--fm); font-size: 12px; color: var(--txt); font-weight: 500; }

/* ── FILTER BAR (chips row) ── */
.filter-bar       { margin: 0 28px 10px; background: var(--surf); border: 1px solid var(--bdr); border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.flt-open-btn     { display: inline-flex; align-items: center; gap: 6px; font-family: var(--fm); font-size: 12px; font-weight: 700; color: #fff; background: var(--gold); border: none; border-radius: 6px; padding: 6px 14px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background .15s; }
.flt-open-btn:hover     { background: #c96d10; }
.flt-open-btn svg       { flex-shrink: 0; }
.flt-open-btn.has-filters { background: #c96d10; }
.flt-chips-wrap   { display: flex; align-items: center; gap: 6px; overflow-x: auto; flex: 1; padding: 2px 0; scrollbar-width: none; }
.flt-chips-wrap::-webkit-scrollbar { display: none; }
.flt-chips-empty  { font-family: var(--fm); font-size: 11.5px; color: var(--muted); font-style: italic; white-space: nowrap; }
.flt-chip         { display: inline-flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 11px; background: var(--blue-bg); color: var(--blue-dk); border: 1px solid var(--blue-bdr); border-radius: 20px; padding: 3px 10px; white-space: nowrap; flex-shrink: 0; }
.flt-chip-x       { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 0 0 2px; display: flex; align-items: center; }
.flt-chip-x:hover { color: #c00; }
.flt-chips-clearall { font-family: var(--fm); font-size: 11px; color: #c0392b; white-space: nowrap; flex-shrink: 0; cursor: pointer; border: none; background: none; padding: 0; }
.flt-chips-clearall:hover { text-decoration: underline; }

/* ── SCROLL CONTROLS ── */
.scroll-hint-bar   { margin: 0 28px 6px; display: flex; align-items: center; gap: 10px; }
.scroll-btn        { background: var(--surf); border: 2px solid var(--gold); border-radius: 4px; padding: 3px 12px; font-size: 15px; color: var(--gold); cursor: pointer; transition: all .15s; line-height: 1.4; flex-shrink: 0; font-weight: 700; }
.scroll-btn:hover  { background: var(--gold); color: #fff; border-color: var(--gold); }
.pos-dots-bar      { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; padding: 4px 0; flex-wrap: wrap; }
.pos-dot           { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #8aaabb; background: transparent; display: inline-block; transition: all .2s; cursor: pointer; flex-shrink: 0; }
.pos-dot:hover     { border-color: var(--blue); }
.pos-dot.pos-dot-active { background: var(--gold); border-color: var(--gold); transform: scale(1.25); }

/* ── TABLE ── */
.tbl-outer-wrap { position: relative; margin: 0 28px; }
.tbl-outer      { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--bdr); background: var(--surf); box-shadow: 0 4px 16px rgba(0,0,0,.10); scrollbar-width: thin; scrollbar-color: #8aaabb #dce8f0; }
.tbl-outer::-webkit-scrollbar       { height: 11px; }
.tbl-outer::-webkit-scrollbar-track { background: #dce8f0; border-top: 1px solid var(--bdr); }
.tbl-outer::-webkit-scrollbar-thumb { background: #8aaabb; border-radius: 6px; border: 2px solid #dce8f0; }
.tbl-outer::-webkit-scrollbar-thumb:hover { background: #1e6fa8; }

.ps-tbl { border-collapse: separate; border-spacing: 0; font-size: 13px; }

.row-lbl {
  position: sticky; left: 0; z-index: 5;
  background: var(--surf2);
  min-width: var(--lbl-w); max-width: var(--lbl-w); width: var(--lbl-w);
  padding: 6px 11px;
  text-align: left; font-family: var(--fm); font-size: 11px; color: #3d5a72; letter-spacing: .03em;
  border-right: 2px solid var(--bdr); border-bottom: 1px solid var(--bdr-lt);
  vertical-align: middle; white-space: nowrap; cursor: default;
}
.row-lbl::after {
  content: ''; position: absolute; top: 0; right: -7px; bottom: 0; width: 7px;
  background: linear-gradient(to right, rgba(0,0,0,.07), transparent);
  pointer-events: none;
}
.has-tip { text-decoration: underline dotted var(--muted-lt); cursor: help; }

.tbl-cell {
  min-width: var(--col-w); max-width: var(--col-w); width: var(--col-w);
  padding: 6px 7px;
  border-bottom: 1px solid var(--bdr-lt); border-right: 1px solid var(--bdr-lt);
  vertical-align: middle; text-align: center;
  font-family: var(--fm); font-size: 12px; color: var(--txt);
}
.tbl-cell:last-child { border-right: none; }
.col-even { background: #ffffff; }
.col-odd  { background: #f7f9fc; }

.tbl-row-img .row-lbl,
.tbl-row-img .tbl-cell  { height: 88px; padding: 5px; }
.thumb-ph { width: 78px; height: 76px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--fh); font-size: 20px; font-weight: 800; color: rgba(255,255,255,.9); margin: 0 auto; }
.thumb-img { width: 78px; height: 76px; object-fit: contain; display: block; margin: 0 auto; border-radius: 6px; }

.tbl-row-brand .tbl-cell { font-family: var(--fh); font-weight: 700; font-size: 13px; }
.tbl-row-model .tbl-cell { font-size: 12px; font-family: var(--fb); line-height: 1.3; }

.cell-btn { display: inline-flex; align-items: center; gap: 4px; font-family: var(--fm); font-size: 11px; background: var(--blue-bg); color: var(--blue-dk); border: 1px solid var(--blue-bdr); border-radius: 4px; padding: 3px 8px; transition: all .15s; text-decoration: none; white-space: nowrap; }
.cell-btn:hover { background: var(--blue); color: #fff; text-decoration: none; }

.chk { width: 15px; height: 15px; fill: none; stroke: #2e8b57; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }

.cell-num       { font-family: var(--fm); font-size: 12px; }
.cell-na        { color: var(--muted-lt); font-style: italic; font-family: var(--fb); font-size: 11px; }
.cell-cnt-z     { color: var(--muted-lt); }
.cell-cnt-p     { font-weight: 500; }
.cell-price-lnk { font-family: var(--fm); font-size: 12.5px; font-weight: 500; color: var(--txt); display: block; }
.cell-price-lnk:hover { color: var(--blue); text-decoration: underline; }

.tbl-section-row .row-lbl      { background: var(--navy); color: rgba(255,255,255,.92); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; border-right: 2px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.08); padding: 5px 11px; font-weight: 500; }
.tbl-section-row .row-lbl::after { background: linear-gradient(to right, rgba(0,0,0,.18), transparent); }
.tbl-section-row .sec-fill      { background: var(--navy-bg); border-bottom: 1px solid var(--navy-bdr); }
.no-results-row td { padding: 24px; text-align: center; font-family: var(--fb); color: var(--muted); font-style: italic; }

/* ── SORT INDICATOR (orange lines icon appended to sorted row label) ── */
.sort-ind     { display: inline-flex; align-items: center; margin-left: 5px; vertical-align: middle; flex-shrink: 0; }
.sort-ind svg { stroke: var(--gold); }

/* ── FILTER OVERLAY ── */
.flt-overlay      { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 800; align-items: center; justify-content: center; padding: 16px; }
.flt-overlay.open { display: flex; }
.flt-panel        { background: #fff; border-radius: 14px; max-width: 800px; width: 100%; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 16px 56px rgba(0,0,0,.32); overflow: hidden; }

.flt-panel-head  { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 2px solid rgba(255,255,255,.12); background: var(--navy); flex-shrink: 0; }
.flt-panel-title { font-family: var(--fh); font-size: 18px; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.flt-close-btn   { background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; width: 34px; height: 34px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: all .15s; }
.flt-close-btn:hover { background: rgba(255,255,255,.25); }

.flt-panel-body  { flex: 1; overflow-y: auto; min-height: 0; padding: 20px 26px; }

.flt-sec          { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--bdr-lt); }
.flt-sec:last-child { border-bottom: none; margin-bottom: 4px; }
.flt-sec-title    { font-family: var(--fm); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.flt-brand-pills  { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.flt-brand-pill   { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; border: 2px solid var(--bdr); background: var(--surf2); cursor: pointer; font-family: var(--fh); font-size: 13px; font-weight: 700; color: var(--txt); transition: all .15s; user-select: none; }
.flt-brand-pill:hover { border-color: var(--muted); }
.flt-brand-pill.sel   { color: #fff; border-color: transparent; }
.flt-brand-clr    { background: none; border: none; color: var(--gold); font-family: var(--fm); font-size: 11px; font-weight: 700; cursor: pointer; padding: 2px 0 0; letter-spacing: .04em; }
.flt-brand-clr:hover { text-decoration: underline; }

.flt-row         { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.flt-row-ico     { font-size: 18px; flex-shrink: 0; line-height: 1; width: 24px; text-align: center; }
.flt-row-lbl     { font-family: var(--fm); font-size: 11px; font-weight: 700; color: var(--navy); letter-spacing: .03em; min-width: 158px; max-width: 158px; }

.flt-inp         { font-family: var(--fm); font-size: 13px; font-weight: 500; border: 2px solid var(--bdr); border-radius: 7px; padding: 6px 10px; width: 90px; color: var(--txt); background: #fff; -moz-appearance: textfield; appearance: textfield; }
.flt-inp::-webkit-inner-spin-button,
.flt-inp::-webkit-outer-spin-button { -webkit-appearance: none; display: none; }
.flt-inp:focus          { outline: none; }
.flt-inp-red:focus      { border-color: #dc3545; box-shadow: 0 0 0 2px rgba(220,53,69,.14); }
.flt-inp-grn:focus      { border-color: #198754; box-shadow: 0 0 0 2px rgba(25,135,84,.14); }
.flt-inp-tel:focus      { border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13,148,136,.14); }
.flt-inp-gld:focus      { border-color: #a07800; box-shadow: 0 0 0 2px rgba(160,120,0,.14); }
.flt-inp-blu:focus      { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(30,111,168,.14); }

.flt-presets     { display: flex; gap: 4px; flex-wrap: wrap; }
.flt-preset      { font-family: var(--fm); font-size: 11px; font-weight: 600; border-radius: 5px; padding: 5px 9px; cursor: pointer; transition: opacity .12s; white-space: nowrap; border: none; color: #fff; }
.flt-preset:hover { opacity: .82; }
.flt-pr-red      { background: #dc3545; }
.flt-pr-grn      { background: #198754; }
.flt-pr-tel      { background: #0d9488; }
.flt-pr-gld      { background: #a07800; }
.flt-pr-yel      { background: #ffc107; color: #1a1200; }
.flt-pr-blu      { background: var(--blue); }

.flt-clr-x       { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--gold); background: #fff; color: var(--gold); font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; line-height: 1; padding: 0; }
.flt-clr-x:hover { background: var(--gold); color: #fff; }

.flt-est-btn     { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: none; border-radius: 5px; padding: 5px 10px; cursor: pointer; font-family: var(--fm); transition: opacity .15s; white-space: nowrap; }
.flt-est-btn:disabled { opacity: .32; cursor: not-allowed; }
.flt-est-btn .est-wh   { font-size: 13px; font-weight: 700; line-height: 1.2; }
.flt-est-btn .est-name { font-size: 9px; font-weight: 500; opacity: .85; line-height: 1.2; }
.flt-est-btn.est-must   { background: var(--est-must);   color: #fff; }
.flt-est-btn.est-good   { background: var(--est-good);   color: #333; }
.flt-est-btn.est-luxury { background: var(--est-luxury); color: #fff; }

.flt-preset-divider      { width: 1px; height: 22px; background: rgba(0,0,0,.14); align-self: center; flex-shrink: 0; margin: 0 3px; }
.flt-ast                 { color: var(--gold); font-weight: 800; font-size: 14px; line-height: 1; margin-left: 2px; vertical-align: middle; }
.flt-estimator-note-row  { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.flt-estimator-line      { width: 30%; height: 1px; background: var(--bdr); flex-shrink: 0; }
.flt-estimator-note      { flex: 1; text-align: right; font-family: var(--fb); font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.flt-estimator-note a    { font-size: 10.5px; }

.flt-bool-grid    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px 16px; }
.flt-bool-row     { display: flex; align-items: center; gap: 7px; font-family: var(--fb); font-size: 12.5px; color: var(--txt); cursor: pointer; user-select: none; }
.flt-bool-row input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--blue); flex-shrink: 0; }

.flt-sort-wrap   { display: flex; align-items: center; gap: 10px; }
.flt-sort-ico    { color: var(--muted); display: flex; align-items: center; flex-shrink: 0; }
.flt-sort-sel    { font-family: var(--fm); font-size: 12px; padding: 7px 10px; border: 2px solid var(--bdr); border-radius: 7px; background: #fff; color: var(--txt); cursor: pointer; width: auto; max-width: 340px; }
.flt-sort-sel:focus { outline: none; border-color: var(--blue); }

.flt-adv-btn      { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--surf2); border: 1.5px solid var(--bdr); border-radius: 7px; padding: 8px 18px; font-family: var(--fm); font-size: 11px; font-weight: 700; color: var(--navy); cursor: pointer; width: 100%; transition: all .15s; letter-spacing: .04em; text-transform: uppercase; }
.flt-adv-btn:hover { background: var(--blue-bg); border-color: var(--blue-bdr); color: var(--blue-dk); }
.flt-adv-btn.open  { background: var(--navy); color: #fff; border-color: var(--navy); }
.flt-adv-body      { padding-top: 10px; }

.flt-panel-foot   { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 2px solid var(--bdr); background: var(--surf2); flex-shrink: 0; }
.flt-count-preview { font-family: var(--fm); font-size: 11px; color: var(--muted); margin-right: auto; }
.flt-reset-btn    { font-family: var(--fm); font-size: 12px; font-weight: 600; background: none; border: 1.5px solid var(--bdr); color: var(--muted); border-radius: 7px; padding: 8px 18px; cursor: pointer; transition: all .15s; }
.flt-reset-btn:hover { border-color: #c0392b; color: #c0392b; }
.flt-apply-btn    { font-family: var(--fm); font-size: 13px; font-weight: 700; background: var(--gold); color: #fff; border: none; border-radius: 7px; padding: 9px 28px; cursor: pointer; transition: background .15s; }
.flt-apply-btn:hover { background: #c96d10; }

/* ── RESPONSIVE (comparison chart page elements) ── */
@media (max-width: 720px) {
  .tbl-page-head, .filter-bar, .scroll-hint-bar, .tbl-outer-wrap { padding-left: 14px; padding-right: 14px; margin-left: 0; margin-right: 0; }
  .filter-bar, .scroll-hint-bar, .tbl-outer-wrap { margin: 0 14px 10px; }
}
@media (max-width: 600px) {
  .flt-bool-grid { grid-template-columns: 1fr 1fr; }
}
