/* The terminal-wide hover tooltip (util/hoverTips.ts): data-tip and adopted title attributes */
.fl-tip {
  position: fixed;
  z-index: 10002;
  display: none;
  max-width: 240px;
  padding: 5px 8px;
  background: #2b2b2f;
  border: 1px solid #3c3c42;
  border-radius: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  color: #e4e4e7;
  font-family: var(--app-font), sans-serif;
  font-size: 10.5px;
  line-height: 1.4;
  white-space: pre-line;
  pointer-events: none;
}
@font-face {
  font-family: 'Quantico';
  src: url('./quantico-BXatNHwx.ttf') format('truetype');
}
@font-face {
  font-family: 'Fira Code';
  src: url('./fira-code-DParIw5o.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  src: url('./inter-DYjygwQm.ttf') format('truetype');
}
/* Morning brief cards (Newsreader + IBM Plex Sans, both OFL) */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  src: url('./newsreader-s-izfB6B.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  src: url('./newsreader-italic-CJDneadR.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 100 700;
  src: url('./ibm-plex-sans-IvpUvPa2.woff2') format('woff2');
}
@font-face {
  font-family: 'Kanit';
  src: url('./kanit-bWYhieLo.ttf') format('truetype');
}

/* App fonts: Settings > General > App Font overrides both (util/uiPrefs.ts) */
:root {
  --app-font: 'Quantico';
  --app-body-font: 'Inter';
}

.non-selectable {
  user-select: none;
}

/* Number inputs never show spinner arrows, anywhere in the app. */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.small-dark-input {
  padding: 4px;
  border-radius: 4px;
  background-color: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12px;
  outline: none;
  flex: 1;
  box-sizing: border-box;
}

/* News item action bar: related actions grouped as bordered segments */
.news-tb {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 8px 6px;
  box-sizing: border-box;
  background-color: var(--bg-alt);
  margin-top: -3px;
  user-select: none;
}

.news-tb-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.news-tb-send {
  margin-left: 16px;
}

.news-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-button);
  border: none;
  cursor: pointer;
  transition:
    background-color 0.1s ease,
    color 0.1s ease;
}

.news-tb-btn + .news-tb-btn {
  border-left: 1px solid var(--border);
}

.news-tb-btn:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg-button-hover);
}

.news-tb-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.news-tb-btn img {
  width: 16px;
  height: 16px;
}

.small-dark-button {
  padding: 3px 6px;
  border-radius: 4px;
  background-color: var(--bg-button);
  color: var(--text);
  border: 1px solid var(--bg-input);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.1s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.small-dark-button img {
  width: 20px;
  height: 20px;
}

.small-dark-button:hover {
  background-color: var(--bg-button-hover);
}

.settings-bar {
  height: 25px;
  display: flex;
  align-items: center;
}

.text-yellow {
  color: rgba(255, 215, 0);
  font-weight: bold;
}

.text-pink {
  color: #ff7fd3;
  font-weight: bold;
}

.text-blue {
  color: rgb(135, 206, 255);
  font-weight: bold;
}

/* Bright text colors picked for dark backgrounds. Dark themes keep the exact
   value; light themes get a darker shade of the same hue that reads on paper */
:root {
  --tc-00ff88: #00ff88;
  --tc-34d399: #34d399;
  --tc-6dd36d: #6dd36d;
  --tc-88cc88: #88cc88;
  --tc-45b5ff: #45b5ff;
  --tc-4ade80: #4ade80;
  --tc-4caf50: #4caf50;
  --tc-5cb85c: #5cb85c;
  --tc-81c784: #81c784;
  --tc-bfbfbf: #bfbfbf;
  --tc-d1d1d1: #d1d1d1;
  --tc-e0a800: #e0a800;
  --tc-e59024: #e59024;
  --tc-f0c040: #f0c040;
  --tc-f0f0f0: #f0f0f0;
  --tc-f1c40f: #f1c40f;
  --tc-f59e0b: #f59e0b;
  --tc-f5a623: #f5a623;
  --tc-f87171: #f87171;
  --tc-fbbf24: #fbbf24;
  --tc-ff4444: #ff4444;
  --tc-ff5c5c: #ff5c5c;
  --tc-ff6b6b: #ff6b6b;
  --tc-ffc832: #ffc832;
  --tc-ffd700: #ffd700;
  --tc-ffeb3b: #ffeb3b;
  --tc-fffa9f: #fffa9f;
}

[data-theme='light'] {
  --tc-00ff88: #1f7a4a;
  --tc-34d399: #047857;
  --tc-6dd36d: #2e7d32;
  --tc-88cc88: #2e7d32;
  --tc-45b5ff: #0b6bb5;
  --tc-4ade80: #15803d;
  --tc-4caf50: #2e7d32;
  --tc-5cb85c: #2e7d32;
  --tc-81c784: #2e7d32;
  --tc-bfbfbf: var(--text-dim);
  --tc-d1d1d1: var(--text-dim);
  --tc-e0a800: #a86b00;
  --tc-e59024: #a85d0b;
  --tc-f0c040: #a86b00;
  --tc-f0f0f0: var(--text);
  --tc-f1c40f: #a86b00;
  --tc-f59e0b: #b45309;
  --tc-f5a623: #a86b00;
  --tc-f87171: #b91c1c;
  --tc-fbbf24: #a86b00;
  --tc-ff4444: #c62828;
  --tc-ff5c5c: #c62828;
  --tc-ff6b6b: #c62828;
  --tc-ffc832: #a86b00;
  --tc-ffd700: #8a6d00;
  --tc-ffeb3b: #8a6d00;
  --tc-fffa9f: #8a6d00;
}

.news-tweet-author {
  color: #9ca3af;
  font-weight: 700;
}

[data-theme='light'] .news-tweet-author {
  color: var(--text-dim);
}

/* Default highlight colors are picked for dark backgrounds (gold / sky blue /
   pastel pink) and are unreadable as text on white — darker equivalents. */
[data-theme='light'] .text-yellow {
  color: #9a6700;
}

[data-theme='light'] .text-pink {
  color: #bf3989;
}

[data-theme='light'] .text-blue {
  color: #0969da;
}

.small-dark-button.button-red {
  background-color: rgba(200, 0, 0, 0.5);
}

.small-dark-button.button-blue {
  background-color: rgba(0, 100, 255, 0.5);
}

.news-wrapper {
  padding: 3px;
  margin-bottom: 3px;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  margin-left: 0.5%;
  margin-right: 0.5%;
}

.news-wrapper:hover {
  color: var(--text);
}

.news-wrapper-critical {
  box-shadow: 0px 0px 4px 2px rgba(0, 191, 255, calc(0.5 * var(--highlight-intensity, 1)));
}

.news-wrapper-critical:hover {
  box-shadow: 0px 0px 4px 2px rgba(0, 191, 255, calc(0.7 * var(--highlight-intensity, 1)));
}

.news-wrapper-price-alert {
  box-shadow: 0px 0px 4px 2px rgba(0, 191, 255, calc(0.5 * var(--highlight-intensity, 1)));
}

.news-wrapper-price-alert:hover {
  box-shadow: 0px 0px 4px 2px rgba(0, 191, 255, calc(0.7 * var(--highlight-intensity, 1)));
}

.news-wrapper-price-alert-up {
  box-shadow: 0px 0px 2px 2px rgba(255, 191, 0, calc(0.5 * var(--highlight-intensity, 1)));
  color: var(--text);
}
.news-wrapper-price-alert-up:hover {
  box-shadow: 0px 0px 2px 2px rgba(255, 191, 0, calc(0.7 * var(--highlight-intensity, 1)));
  color: var(--text);
}
.news-wrapper-price-alert-down {
  box-shadow: 0px 0px 2px 2px rgba(255, 191, 0, calc(0.5 * var(--highlight-intensity, 1)));
  color: var(--text);
}

.news-wrapper-price-alert-down:hover {
  box-shadow: 0px 0px 2px 2px rgba(255, 191, 0, calc(0.7 * var(--highlight-intensity, 1)));
  color: var(--text);
}

/* .news-wrapper-price-alert {
  background-color: #2e2e00 !important;
  box-shadow: 0px 0px 2px 2px rgba(255, 191, 0, 0.5);
}

.news-wrapper-price-alert:hover {
  background-color: #4d4d00 !important;
  box-shadow: 0px 0px 2px 2px rgba(255, 191, 0, 0.7);
} */

/* Light theme highlight overrides removed — backgrounds now computed in JS via highlight intensity */

.news-time {
  font-size: 10px;
  right: 0;
  color: var(--text-muted);
}
.news-time:hover {
  color: var(--tc-fffa9f);
}

[data-theme='light'] .news-time:hover {
  color: #9a6700;
}
.search-button,
.news-button {
  background-color: var(--bg-hover);
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  border: none;
  box-shadow: none;
  outline: none;
}

.search-button {
  border-radius: 1px 0 0 1px;
}

.news-button {
  color: var(--text);
  border-radius: 0 2px 2px 0;
  /* font-weight: bold; */
  font-size: 16px;
  font-family: var(--app-font);
  padding-left: 2px;
  padding-right: 5px;
  /* min-width: 125px; */
  width: 115px;
}

.news-button:hover,
.search-button:hover {
  background-color: var(--bg-button-hover);
}

.news-side-bar {
  display: flex;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  cursor: pointer;
  z-index: 1;
}

.news-cap-color {
  width: 5px;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.news-gap {
  width: 10px;
}

.news-seek-row {
  box-sizing: border-box;
  padding: 6px 10px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.day-break {
  text-align: center;
  background-color: var(--bg-alt);
  color: var(--text);
}

.day-break-line {
  border: none;
  height: 1px;
  background-color: var(--bg-button-hover);
  margin: 1px;
}

.day-break-text {
  font-size: 12px;
}

.status-label {
  font-size: 13px;
}

.profit {
  color: var(--profit) !important;
}

.loss {
  color: var(--loss) !important;
}

.news-explainer-box {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-dim);
}

.news-explainer-box-gray {
  background: var(--bg-alt);
  border-left: 3px solid var(--text-muted);
}

.news-explainer-box-blue {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
}

.news-explainer-box-purple {
  background: var(--bg-alt);
  border-left: 3px solid #7fccc2;
}

/* Inline summary (Truth posts): the distilled lead headline + points box render
   above the full post. While the AI distill runs (~0.7s) a skeleton reserves the
   slot so the post never shifts when the summary lands. */
.news-inline-summary {
  overflow: hidden;
}
.news-inline-lead {
  font-weight: 400;
}
.news-inline-skeleton {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 0;
}
.news-inline-skeleton-box {
  margin-top: 4px;
  padding: 7px 8px;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.news-sk {
  height: 13px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--text) 6%, transparent),
    color-mix(in srgb, var(--text) 16%, transparent),
    color-mix(in srgb, var(--text) 6%, transparent)
  );
  background-size: 200% 100%;
  animation: newsSkShimmer 1.2s linear infinite;
}
.news-sk-lead {
  height: 15px;
}
@keyframes newsSkShimmer {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .news-sk {
    animation: none;
  }
}
