/* ============================================================
   SevenTicker — Compound Interest Calculator
   Page-specific styles (extends style.css + tools.css)
   ============================================================ */

/* Prevent horizontal scroll at all viewports */
html, body { max-width: 100%; overflow-x: hidden; }

/* Narrower wrapper for the calculator page */
.page-wrapper { max-width: 1200px; }

/* ── Calculator grid layout ── */
.calc-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 48px;
}

@media (max-width: 920px) {
  /* Collapse to single column */
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 0;
    overflow-x: hidden;
  }

  /* Grid children must not inflate the column */
  .calc-layout > * { min-width: 0; }

  /* Input panel: no sticky, rounded top, flush bottom */
  .input-panel {
    position: static;
    width: 100%;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    border-bottom: none;
  }

  /* Slider fits inside panel */
  .slider-group { width: 100%; min-width: 0; }
  input[type="range"] { min-width: 0; width: 100%; }

  /* Chart container constrained to viewport */
  .chart-container {
    height: 280px;
    max-width: 100%;
    overflow: hidden;
  }
  .chart-container canvas { max-width: 100% !important; }

  /* Results panel "emerges" from below the input card */
  .results-panel {
    margin-top: -24px;
    border-radius: 20px 20px 0 0;
    background: #0D1425;
    border-top: 2px solid #F5C518;
    padding: 28px 20px 0;
    position: relative;
    z-index: 1;
    max-width: 100%;
    min-width: 0;
  }
}

/* ── Chart card header & legend ── */
.chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.legend-dot--accent { background: var(--accent); }
.legend-dot--green  { background: var(--positive); }

/* Color alias used on the interest result card */
.result-card__value.green { color: var(--positive); }

/* ── Spacing helpers ── */
.ad-spacer      { margin: 28px 0; }
.section-spacer { margin: 48px 0; }
