/* summary.css */
/* Bloomberg-style summary card styling */

.bbg-wrap {
  background: #0b0f14;
  color: #dbe2ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", Consolas, monospace;
  border: 1px solid #1a222d;
  border-radius: 10px;
  padding: 16px;
}

.bbg-wrap a {
  color: #79ff97;
  text-decoration: underline;
}

.bbg-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bbg-ticker {
  font-size: 20px;
  color: #79ff97;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.bbg-title {
  color: #f0f3f7;
  font-weight: 600;
}

.bbg-sub {
  color: #9fb3c8;
  font-size: 12px;
}

.bbg-price {
  font-size: 24px;
  font-weight: 800;
  color: #79ff97;
}

.bbg-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-flow: dense;
}

.bbg-card {
  background: #0f141b;
  border: 1px solid #1a222d;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) inset;
}

.bbg-card h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #f3b61f;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.bbg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bbg-table th,
.bbg-table td {
  padding: 6px 8px;
  border-bottom: 1px dotted #273141;
}

.bbg-table th {
  color: #9fb3c8;
  font-weight: 600;
  text-align: left;
}

.bbg-table td {
  color: #dbe2ea;
}

.bbg-right {
  text-align: right;
}

.bbg-k {
  color: #9fb3c8;
}

.bbg-v {
  text-align: right;
  font-weight: 600;
}

.bbg-green {
  color: #79ff97;
}

.bbg-red {
  color: #ff6b6b;
}

.bbg-amber {
  color: #f3b61f;
}

.bbg-dim {
  color: #8aa0b5;
}

.bbg-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.bbg-tag {
  background: #14202b;
  border: 1px solid #233142;
  color: #b9c9d9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.bbg-related {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bbg-rel-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid #1a222d;
  border-radius: 6px;
  background: #0f141b;
}

.bbg-rel-item .t {
  color: #dbe2ea;
  font-weight: 600;
}

.bbg-rel-item .p {
  color: #79ff97;
  font-weight: 700;
}

.bbg-snapshot {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .bbg-snapshot {
    grid-column: span 1;
  }
}

.bbg-card-spaced {
  margin-top: 10px;
}

.bbg-table-spaced {
  margin-top: 8px;
}

.bbg-sub-spaced {
  margin-top: 6px;
}

.bbg-sub-tight {
  margin-bottom: 6px;
}

.bbg-block-tight {
  margin-bottom: 10px;
}

.chart-group {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.chart-box {
  flex: 1 1 320px;
  min-width: 0;
}

.chart-box canvas {
  width: 100% !important;
  height: auto;
  max-width: 100%;
}

.ai-title {
  margin-top: 0;
  font-size: 1.4em;
  color: #4cafef;
  border-bottom: 1px solid #333;
  padding-bottom: 0.3em;
}

.ai-disclaimer {
  font-size: 0.9em;
  line-height: 1.4;
  margin-top: 0.8em;
  margin-bottom: 1.2em;
  color: #bbbbbb;
}

.ai-warning {
  color: #f78c6c;
  font-weight: 600;
}

.ai-summary-box {
  padding: 1em;
  border-radius: 8px;
  border: 1px solid #333333;
  background: #1a1a1a;
}

.ai-summary-box p {
  margin: 0;
}

.ai-summary-body {
  color: #e0e0e0;
}

.ai-summary-body a {
  color: #4caf50;
  text-decoration: underline;
}

.ai-update {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #9aa0a6;
}

.ai-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-content strong {
  font-weight: 600;
}

.no-indicators {
  margin-top: 12px;
  font-style: italic;
  text-align: center;
}

.no-indicators a {
  color: #79ff97;
  text-decoration: underline;
}

.bbg-grid-finance {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.3fr 1fr;
}

@media (max-width: 1000px) {
  .bbg-grid-finance {
    grid-template-columns: 1fr;
  }
}

.bbg-card-wide {
  grid-column: span 2;
}

.finance-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.finance-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.finance-current-prob {
  margin-left: 10px;
}

.finance-btn {
  background: #14202b;
  color: #dbe2ea;
  border: 1px solid #233142;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.finance-btn:hover {
  filter: brightness(1.1);
}

.finance-btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bbg-table-sortable {
  cursor: pointer;
}

.bbg-table-sortable:hover {
  text-decoration: underline;
}

.sort-caret {
  opacity: 0.7;
  margin-left: 4px;
  font-size: 11px;
}

.bbg-current {
  color: #79ff97;
  font-weight: 700;
}

.bbg-row-current {
  background: rgba(121, 255, 151, 0.06);
}

.finance-chart-block {
  margin-top: 12px;
}

.finance-chart-box {
  position: relative;
  height: 280px;
  width: 100%;
}

.finance-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ===== LIGHT THEME OVERRIDES ===== */
body[data-theme="light"] .bbg-wrap {
  background: #f5f7fb;
  color: #1f2937;
  border-color: #c5cedd;
}

body[data-theme="light"] .bbg-wrap a {
  color: #2563eb;
}

body[data-theme="light"] .bbg-title,
body[data-theme="light"] .bbg-table td,
body[data-theme="light"] .bbg-block-tight,
body[data-theme="light"] .bbg-related .t {
  color: #1f2937;
}

body[data-theme="light"] .bbg-sub,
body[data-theme="light"] .bbg-k,
body[data-theme="light"] .bbg-dim,
body[data-theme="light"] .bbg-table th {
  color: #4b5563;
}

body[data-theme="light"] .bbg-price,
body[data-theme="light"] .bbg-ticker,
body[data-theme="light"] .bbg-green,
body[data-theme="light"] .bbg-rel-item .p,
body[data-theme="light"] .bbg-current {
  color: #047857;
}

body[data-theme="light"] .bbg-red {
  color: #b91c1c;
}

body[data-theme="light"] .bbg-amber {
  color: #b45309;
}

body[data-theme="light"] .bbg-card,
body[data-theme="light"] .bbg-rel-item {
  background: #eef2f8;
  border-color: #c5cedd;
}

body[data-theme="light"] .bbg-tag {
  background: #f9fbff;
  border-color: #c5cedd;
  color: #1f2937;
}

body[data-theme="light"] .bbg-table th,
body[data-theme="light"] .bbg-table td {
  border-bottom-color: #dbe3ef;
}

body[data-theme="light"] .bbg-row-current {
  background: rgba(4, 120, 87, 0.1);
}

body[data-theme="light"] .finance-btn {
  background: #f9fbff;
  color: #1f2937;
  border-color: #c5cedd;
}

body[data-theme="light"] .finance-btn:hover {
  filter: brightness(0.99);
}

body[data-theme="light"] .ai-summary-box {
  background: #eef2f8;
  border-color: #c5cedd;
}

body[data-theme="light"] .ai-summary-body {
  color: #334155;
}

body[data-theme="light"] .ai-summary-body a,
body[data-theme="light"] .no-indicators a {
  color: #2563eb;
}

body[data-theme="light"] .ai-title {
  color: #0f766e;
  border-bottom-color: #c5cedd;
}

body[data-theme="light"] .ai-disclaimer,
body[data-theme="light"] .ai-update {
  color: #4b5563;
}

body[data-theme="light"] .ai-warning {
  color: #b45309;
}
