/**
 * Premium-minimal override layer. Loaded after style.css and terminal.css.
 * Calms the visual noise (pill kickers, heavy glows, tall stat cards),
 * tidies the feed, and styles the new components: Long/Short sentiment,
 * trader subscription wallets, and the header notification bell.
 */

/* ---------------------------------------------------------------------
 * Global calm-down
 * ------------------------------------------------------------------- */

:root {
  --tf-long: #1ea75f;
  --tf-short: #e46a3a;
}

/* Kickers: quiet uppercase labels instead of loud pills. */
.tf-kicker {
  min-height: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--tf-text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.tf-kicker::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--tf-gold);
  flex: 0 0 14px;
}

html[data-theme="light"] .tf-kicker {
  background: transparent;
  color: var(--tf-text-soft);
}

/* Chips: lighter weight, softer fill. */
.tf-chip {
  font-weight: 600;
  min-height: 26px;
  font-size: 0.78rem;
}

/* Stat cards: content-sized, less empty vastness. */
.tf-stat-card {
  min-height: 0;
}

.tf-stat-value {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.tf-stat-label {
  margin-bottom: 8px;
  font-size: 0.76rem;
}

/* Softer elevation everywhere. */
html[data-theme="dark"] {
  --tf-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] {
  --tf-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

/* ---------------------------------------------------------------------
 * Feed: tighter, calmer cards
 * ------------------------------------------------------------------- */

.tf-feed-card {
  gap: 12px;
  padding: 20px 22px;
}

.tf-feed-card + .tf-feed-card {
  margin-top: 14px;
}

.tf-feed-card-avatar,
.tf-feed-comment-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.tf-feed-comment-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.tf-feed-card-author-copy strong {
  font-size: 0.95rem;
}

.tf-feed-card-copy {
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 68ch;
}

.tf-feed-card-media {
  border-radius: 12px;
  border-color: var(--tf-border);
}

.tf-feed-card-actions {
  padding-top: 8px;
  gap: 10px;
}

.tf-feed-action-icon {
  padding: 6px 9px;
  font-size: 0.85rem;
}

.tf-feed-card-metrics {
  font-size: 0.8rem;
  color: var(--tf-text-soft);
}

.tf-feed-card-tags {
  gap: 6px;
}

.tf-feed-composer-panel .tf-feed-composer-input {
  min-height: 92px;
}

.tf-feed-card-comments {
  gap: 10px;
  border-top: 1px dashed var(--tf-border);
  padding-top: 12px;
}

/* ---------------------------------------------------------------------
 * Long / Short sentiment index
 * ------------------------------------------------------------------- */

.tf-sentiment {
  display: grid;
  gap: 12px;
  margin: 0 0 26px;
  padding: 20px 22px;
  border: 1px solid var(--tf-border);
  border-radius: 16px;
  background: var(--tf-surface);
}

.tf-sentiment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.tf-sentiment-title {
  margin: 6px 0 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.tf-sentiment-bias {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.tf-sentiment-bias.is-long {
  color: var(--tf-long);
}

.tf-sentiment-bias.is-short {
  color: var(--tf-short);
}

.tf-sentiment-bias.is-neutral {
  color: var(--tf-text-soft);
}

.tf-sentiment-bar {
  position: relative;
  display: flex;
  gap: 2px; /* surface gap between the two fills */
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.tf-sentiment-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  min-width: 6px;
  transition: width 400ms ease;
}

.tf-sentiment-fill-long {
  background: var(--tf-long);
}

.tf-sentiment-fill-short {
  background: var(--tf-short);
}

.tf-sentiment-midline {
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--tf-text-soft);
  opacity: 0.55;
  border-radius: 1px;
  pointer-events: none;
}

.tf-sentiment-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--tf-text);
  font-size: 0.86rem;
  font-weight: 600;
}

.tf-sentiment-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tf-sentiment-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 9px;
}

.tf-sentiment-dot-long {
  background: var(--tf-long);
}

.tf-sentiment-dot-short {
  background: var(--tf-short);
}

.tf-sentiment-basis {
  margin: 0;
  color: var(--tf-text-soft);
  font-size: 0.78rem;
}

.tf-sentiment-compact {
  margin: 0 0 18px;
  padding: 16px 18px;
}

.tf-sentiment-compact .tf-sentiment-bias {
  font-size: 1.05rem;
}

.tf-sentiment-compact .tf-sentiment-title {
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------------
 * Trader subscription wallets
 * ------------------------------------------------------------------- */

.tf-wallet-list {
  display: grid;
  gap: 10px;
}

.tf-wallet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: var(--tf-surface-muted);
  min-width: 0;
}

.tf-wallet-network {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tf-gold-strong);
}

.tf-wallet-address {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  color: var(--tf-text);
  background: transparent;
}

.tf-wallet-copy {
  flex: 0 0 auto;
}

.tf-wallet-self-note {
  margin: 4px 0 0;
  font-size: 0.78rem;
}

.tf-trader-wallet-editor {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.tf-login-field-heading {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tf-text-soft);
}

.tf-wallet-editor-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .tf-wallet-editor-row {
    grid-template-columns: 1fr;
  }

  .tf-wallet-row {
    flex-wrap: wrap;
  }

  .tf-wallet-address {
    flex-basis: 100%;
    order: 3;
  }
}

/* ---------------------------------------------------------------------
 * Header notification bell
 * ------------------------------------------------------------------- */

.tf-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--tf-border);
  color: var(--tf-text-soft);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color var(--tf-transition), border-color var(--tf-transition);
}

.tf-lang-toggle:hover,
.tf-lang-toggle:focus-visible {
  color: var(--tf-gold-strong);
  border-color: var(--tf-gold);
  outline: none;
}

.tf-header-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--tf-border);
  color: var(--tf-text-soft);
  background: transparent;
  transition: color var(--tf-transition), border-color var(--tf-transition);
}

.tf-header-bell:hover,
.tf-header-bell:focus-visible {
  color: var(--tf-gold-strong);
  border-color: var(--tf-gold);
  outline: none;
}

.tf-header-bell .tf-header-chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
}

/* ---------------------------------------------------------------------
 * Indicators: author attribution + trader submission form
 * ------------------------------------------------------------------- */

.tf-indicator-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
}

.tf-indicator-author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 26px;
  border: 1px solid var(--tf-border);
}

.tf-indicator-author-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.82rem;
}

.tf-indicator-author-label {
  color: var(--tf-text-soft);
}

.tf-indicator-author-name {
  color: var(--tf-text);
  font-weight: 700;
  text-decoration: none;
}

a.tf-indicator-author-name:hover,
a.tf-indicator-author-name:focus-visible {
  color: var(--tf-gold-strong);
  outline: none;
}

.tf-indicator-author-compact .tf-indicator-author-avatar {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.tf-indicator-author-compact .tf-indicator-author-copy {
  font-size: 0.76rem;
}

.tf-indicator-submit {
  margin: 0 0 26px;
  padding: 0;
  overflow: hidden;
}

.tf-indicator-submit-summary {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.tf-indicator-submit-summary::-webkit-details-marker {
  display: none;
}

.tf-indicator-submit-summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 18px;
  font-size: 1.2rem;
  color: var(--tf-text-soft);
}

.tf-indicator-submit {
  position: relative;
}

.tf-indicator-submit[open] .tf-indicator-submit-summary::after {
  content: "\2212";
}

.tf-indicator-submit-form {
  display: grid;
  gap: 14px;
  padding: 0 22px 22px;
}

.tf-indicator-submit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tf-indicator-submit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
 * Signup: password visibility toggle
 * ------------------------------------------------------------------- */

.tf-password-wrap {
  position: relative;
  display: block;
}

.tf-password-wrap .tf-login-input {
  width: 100%;
  padding-right: 44px;
}

.tf-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--tf-text-soft);
  cursor: pointer;
}

.tf-password-toggle:hover,
.tf-password-toggle:focus-visible,
.tf-password-toggle.is-on {
  color: var(--tf-gold-strong);
  outline: none;
}

/* ---------------------------------------------------------------------
 * Notifications center: calmer grid rhythm
 * ------------------------------------------------------------------- */

.tf-notification-summary-grid .tf-stat-card {
  min-height: 0;
}
