/* price-targets.css — Price Target Analysis panel on details.html.
 * Inherits the dark-theme variables from details.css. */

/* A grid item; without this the table's intrinsic width widens the whole grid track on phones. */
.price-targets-panel { min-width: 0; }
.pt-table-wrap { overflow-x: auto; }

.price-targets-panel .pt-loading,
.price-targets-panel .pt-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 8px 0;
}
.price-targets-panel .pt-loading { flex-direction: row; align-items: center; gap: 10px; }
.pt-empty.pt-error { color: var(--color-yellow); }
.pt-empty-detail { font-size: 12px; color: var(--text-tertiary); font-family: var(--font-mono); }

.pt-headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.pt-headline > div {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
}
.pt-headline-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}
.pt-headline-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.pt-headline-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.pt-up { color: var(--color-green); }
.pt-down { color: var(--color-red); }
.pt-flat { color: var(--text-secondary); }

.pt-warnings { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pt-warning {
  border: 1px solid var(--color-yellow);
  background-color: rgba(210, 153, 34, 0.08);
  color: var(--color-yellow);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
}

/* Range bar */
.pt-range { margin: 6px 0 18px; padding: 0 6px; }
.pt-range-track {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}
.pt-range-band {
  position: absolute;
  top: 0; bottom: 0;
  background-color: rgba(88, 166, 255, 0.28);
  border-radius: 5px;
}
.pt-range-mark {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 20px;
  margin-left: -2px;
  border-radius: 2px;
}
.pt-mark-price { background-color: var(--text-primary); }
.pt-mark-fmp { background-color: var(--color-blue); }
.pt-mark-av { background-color: var(--color-purple); }
.pt-range-labels { position: relative; height: 18px; margin-top: 8px; font-size: 11px; color: var(--text-tertiary); font-family: var(--font-mono); }
.pt-range-end { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.pt-range-end-left { transform: translateX(0); }
.pt-range-end-right { transform: translateX(-100%); }
.pt-range-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.pt-range-legend span { display: inline-flex; align-items: center; gap: 6px; }

.pt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pt-dot-price { background-color: var(--text-primary); }
.pt-dot-fmp { background-color: var(--color-blue); }
.pt-dot-av { background-color: var(--color-purple); }
.pt-dot-band { background-color: rgba(88, 166, 255, 0.4); }

/* Source table */
.pt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-color);
}
.pt-table td { padding: 8px; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); }
.pt-table .pt-num { font-family: var(--font-mono); text-align: right; }
.pt-table th:not(:first-child):not(:last-child) { text-align: right; }
.pt-table .pt-na { color: var(--text-tertiary); }
.pt-table .pt-when { color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }
.pt-table .pt-src { white-space: nowrap; }
.pt-row-down .pt-unavail { color: var(--color-yellow); font-size: 12px; }
.pt-spread { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }

.pt-coverage { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.pt-cov-src { color: var(--text-primary); font-weight: 600; }
.pt-cov-pubs { color: var(--text-tertiary); cursor: help; }
.pt-rating { white-space: nowrap; }

.pt-note { margin-top: 14px; font-size: 11px; color: var(--text-tertiary); font-style: italic; }

/* ETFs: implied target from the holdings' analyst targets */
.pt-etf-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 12px; font-size: 14px; color: var(--text-primary); }
.pt-etf-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
}
.pt-etf-none {
  background-color: var(--bg-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.pt-etf-none-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.pt-etf-none-reason { margin-top: 4px; font-size: 14px; color: var(--text-secondary); }
.pt-etf-none-cov { margin-top: 6px; font-size: 12px; color: var(--text-tertiary); }
.pt-etf-sub { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); font-weight: 600; margin: 4px 0 6px; }
.pt-etf-sym { font-family: var(--font-mono); font-weight: 700; color: var(--color-blue); }
.pt-etf-name { color: var(--text-tertiary); font-size: 12px; }
.pt-etf-meta { margin-top: 12px; font-size: 12px; color: var(--text-tertiary); }

@media (max-width: 640px) {
  .pt-headline-value { font-size: 22px; }
}
