/* ── Viz area: column with timeline + extra info ──────── */
.viz-area {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

.timeline-wrap {
  flex-shrink: 0;
  height: 200px;
  position: relative;
}

#timelineFrame {
  width: 100%; height: 100%;
  border: none;
  visibility: hidden;
}

.placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  pointer-events: none;
  text-align: center;
  font-size: 13px;
  padding: 0 1rem;
}

/* ── Extra info (fills remaining space below timeline) ── */
.extra-info-wrap {
  flex: 1; min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

#extraInfo {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
}

/* Prompt shown after country selection, before any segment is clicked */
.report-prompt {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Header: "date: Regime Type" */
.report-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

/* Body text — left accent border gives it a document feel */
.report-text {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  color: var(--text-muted);
  text-align: justify;
  font-size: 12.5px;
  line-height: 1.7;
}

/* Footnotes */
.extra-links {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}
.extra-links-label {
  display: block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.extra-links a {
  display: block; color: var(--accent);
  word-break: break-all; margin-bottom: 2px;
  text-decoration: none;
}
.extra-links a:hover { text-decoration: underline; }
.pdf-hint { margin-top: 6px; color: var(--text-muted); font-style: italic; font-size: 11.5px; }

/* ── Mobile topbar (trigger for filter drawer) ───────── */
.mobile-topbar { display: none; } /* hidden on desktop */

/* ── Combobox input (country search) ─────────────────── */
input.ctrl-input {
  background-color: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 8px;
  font-size: 13px;
  font-family: 'Mulish', sans-serif;
  width: 100%;
  min-width: 0;
}
input.ctrl-input:focus { outline: none; border-color: var(--accent); }
input.ctrl-input::placeholder { color: var(--text-muted); }

/* ── Info popup: acronym section ──────────────────────── */
.info-popup { min-width: 320px; }
.ip-sep { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.ip-section-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); margin: 0 0 5px;
}
.acronym-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
}
.acronym-list dt { font-weight: 700; color: var(--text); white-space: nowrap; }
.acronym-list dt a { color: var(--accent); text-decoration: none; }
.acronym-list dt a:hover { text-decoration: underline; }
.acronym-list dd { margin: 0; }

/* ── Download button disabled state ──────────────────── */
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Mobile (≤ 767px) ────────────────────────────────── */
@media (max-width: 767px) {
  /* Override controls.css fixed-height — report text needs page scroll */
  html, body    { height: auto !important; min-height: 100dvh; overflow-y: auto !important; }
  .page-body    { flex: none; overflow: visible; }
  .main-area    { overflow: visible; }
  .viz-area     { flex: none; overflow: visible; }

  /* Show the topbar trigger button */
  .mobile-topbar {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .mobile-topbar .btn { width: 100%; justify-content: center; }

  /* Timeline: slightly shorter to leave more room for content */
  .timeline-wrap { height: 160px; }

  /* Extra info flows with the page rather than scrolling internally */
  .extra-info-wrap { flex: none; overflow-y: visible; }

  /* Prevent iOS Safari from zooming into focused inputs/selects */
  select.ctrl-select,
  input.ctrl-input { font-size: 16px !important; }
}
