/* ============================================================
   SevenTicker — Stock Profit Goal Calculator
   Page-specific styles (extends style.css + tools.css)
   ============================================================ */

body { max-width: 100%; overflow-x: hidden; }

.page-wrapper { max-width: 1200px; }

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

.calc-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Ad in left column */
.ad-spacer--left {
  flex: 1;
  margin-top: 20px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
}
.ad-spacer--left .ad-unit {
  flex: 1;
  height: 100%;
}

/* Top separator: hidden on large */
.ad-spacer--top { display: none; }

/* Bottom ad: lives inside results-panel, fills remaining vertical space */
.ad-spacer--bottom {
  flex: 1;
  min-height: 60px;
  display: flex;
  flex-direction: column;
}
.ad-spacer--bottom .ad-unit {
  flex: 1;
  height: 100%;
}

@media (max-width: 920px) {
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 0;
    overflow-x: hidden;
    align-items: start;
  }

  .calc-layout > * { min-width: 0; }

  .calc-left       { display: block; width: 100%; min-width: 0; }
  .ad-spacer--left { display: none; }

  .input-panel {
    position: static;
    width: 100%;
    border-radius: var(--radius-card);
  }

  .ad-spacer--top {
    display: block;
    margin: 16px 0;
    min-width: 0;
  }

  .results-panel {
    margin-top: 0;
    border-radius: 20px 20px 0 0;
    background: #0D1425;
    border-top: 2px solid #F5C518;
    padding: 28px 20px 20px;
    position: relative;
    z-index: 1;
    max-width: 100%;
    min-width: 0;
  }
}

/* ── Form extras ── */
.form-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0 20px;
}

.form-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Goal input highlight */
.goal-input {
  border-color: rgba(245, 197, 24, 0.35) !important;
  background: rgba(245, 197, 24, 0.04) !important;
}

.goal-input:focus {
  border-color: var(--accent) !important;
  background: rgba(245, 197, 24, 0.08) !important;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15) !important;
}

/* ── Results panel ── */
.results-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Primary: Required Sell Price card */
.result-card--primary {
  background: linear-gradient(135deg, #111827 0%, #161f30 100%);
  border-color: rgba(245, 197, 24, 0.2);
  box-shadow: 0 4px 24px rgba(245, 197, 24, 0.06);
}

.result-card--primary .result-card__value {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.result-card__label-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

/* Color variants */
.result-card__value.positive { color: var(--positive); }
.result-card__value.negative { color: var(--negative); }
.result-card__value.accent   { color: var(--accent); }

/* Sub-label beneath primary value */
.result-card__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 1em;
}

/* Results grid: 2 columns */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; }
}

/* After-tax / goal confirmation card */
.result-card--goal {
  background: linear-gradient(135deg, #0f1a2a 0%, #131e30 100%);
  border-color: rgba(16, 185, 129, 0.15);
}

.result-card--goal .result-card__value {
  font-size: 1.75rem;
}

/* Tax / rate badge */
.result-tax-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
  padding: 16px 0 0;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--accent);
  opacity: 1;
}

.breadcrumb__sep {
  font-size: 0.7rem;
  opacity: 0.4;
}

.breadcrumb__current {
  color: var(--text-secondary);
}

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