/* static/css/overrides.css */

body {
  font-family: 'Inter', sans-serif !important;
  background-color: #000 !important;
  color: #fff !important;
}

input[type="number"] {
  font-family: 'Inter', sans-serif !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  background-color: #ffffff !important;
  border: 1px solid #9ca3af;
  border-radius: 4px;
  padding: 3px 6px;
  min-width: 4rem;
}

/* Page-level styling just for this settings page */
.settings-page {
  font-family: 'Inter', sans-serif;
  background-color: #000;
  color: #fff;
}

/* Make the main title readable */
.settings-page h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem auto 1rem;
  max-width: 900px;
}

/* Center the form and give it breathing room */
.settings-form {
  max-width: 900px;
  margin: 0 auto 5rem;   /* center + bottom space above fixed buttons */
  padding: 0 1.5rem;
}

/* Space between rows */
.settings-form > div {
  margin-bottom: 1rem;
}

/* Labels above controls */
.settings-form label {
  display: inline-block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Horizontal line color + spacing */
.settings-form hr {
  border: none;
  border-top: 1px solid #333;
  margin: 0.75rem 0 0.75rem;
}

/* Sliders: full width but not insane */
.settings-form input[type="range"] {
  width: 260px;
  margin-right: 0.75rem;
}

/* Number boxes: fixed size so they line up */
.settings-form input[type="number"] {
  width: 80px;
  font-family: 'Inter', sans-serif;
  color: #000;
  -webkit-text-fill-color: #000; /* Chrome/Safari */
  background-color: #fff;
  border: 1px solid #9ca3af;
  border-radius: 4px;
  padding: 3px 6px;
}

/* Question mark next to labels a bit dimmer */
.settings-form label span {
  font-weight: 400;
  opacity: 0.7;
}

/* ============================
   BOTTOM CORNER BUTTONS
   ============================ */

.settings-actions {
  position: fixed;
  bottom: 1.5rem;
  z-index: 50;
}

.settings-actions-left {
  left: 1.5rem;
}

.settings-actions-right {
  right: 1.5rem;
}

.settings-actions a,
.settings-actions button {
  background-color: #CEFE03;  /* custom_minimalist primary */
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  text-decoration: none;
}

/* Hover feedback */
.settings-actions a:hover,
.settings-actions button:hover {
  background-color: #B0DA02; /* primary-focus */
}

/* ============================
   SLIDER COLOR OVERRIDES
   ============================ */

/* Use your primary green for the thumb and a dark track */
.settings-form input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background-color: #CEFE03; /* primary */
  cursor: pointer;
  margin-top: -4px; /* centers thumb vertically on track in Chrome */
}

.settings-form input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background-color: #2a2a2a;
}

.settings-form input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background-color: #CEFE03;
  cursor: pointer;
}

.settings-form input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background-color: #2a2a2a;
}

.help-icon {
  margin-left: 4px;
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.85rem;
}

.help-icon:hover {
  opacity: 1;
}

:root {
  --tp-green: #CEFE03;
}

/* ---------- Chrome / Safari ---------- */
input[type="range"] {
  -webkit-appearance: none;
  width: 260px;
  height: 4px;
  background: #333; /* unfilled track */
  border-radius: 4px;
  outline: none;
}

/* Filled left side (WebKit hack using box-shadow) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--tp-green);
  cursor: pointer;
  box-shadow: calc(var(--value, 0) * 1px) 0 0 2px var(--tp-green);
}

/* Track itself */
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(
      to right,
      var(--tp-green) 0%,
      var(--tp-green) calc(var(--value-percent, 0%)),
      #333 calc(var(--value-percent, 0%)),
      #333 100%
  );
}


/* ---------- Firefox ---------- */
input[type="range"]::-moz-range-progress {
  background-color: var(--tp-green);
  height: 4px;
}

input[type="range"]::-moz-range-track {
  background: #333;
  height: 4px;
}

input[type="range"]::-moz-range-thumb {
  background: var(--tp-green);
  border-radius: 50%;
  height: 16px;
  width: 16px;
  cursor: pointer;
}


/* Global Inter font + dark background */
html, body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif !important;
  background-color: #000000;
  color: #ffffff;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Make basic text feel nicer */
body {
  font-size: 14px;
  line-height: 1.5;
}

/* Headings: slightly larger + tighter tracking */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5rem 0;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

/* Navbar tweaks (works with your Tailwind classes) */
nav {
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: #CEFE03; /* your primary green */
}

/* Buttons: black/green look, even if not using Tailwind classes */
button,
.btn {
  font-family: inherit;
  font-weight: 500;
  border-radius: 9999px;
}

/* Profile page layout – keep content from hugging the edges */
body > h1,
body > p,
body > hr,
body > form,
body > div,
body > a {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

/* Table on portfolio page */
#portfolio-output table {
  border-color: #333333;
}

#portfolio-output th,
#portfolio-output td {
  border: 1px solid #333333;
  padding: 0.4rem 0.6rem;
}

#portfolio-output th {
  font-weight: 600;
}

/* Make legend text readable on dark bg (in case Chart.js inline styles fail) */
.chartjs-legend li span {
  border-radius: 9999px;
}

/* Bigger legend text + dots next to the donut */
.chartjs-legend ul {
  font-size: 0.9rem;           /* bump up label text size */
}

.chartjs-legend li {
  margin-bottom: 0.25rem;      /* a bit more vertical spacing */
}

.chartjs-legend li span {
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.4rem;        /* space between dot and ticker text */
}


/* Ensure sticky nav feels layered and clean */
nav {
  background: #000;
}

/* Optional: slightly soften card borders */
.bg-neutral {
  border-color: rgba(255,255,255,0.06);
}

/* ===== TailorPortfolio layout overrides ===== */

/* 1) Consistent rounded corners for all your main "box" sections */
.tp-card {
  border-radius: 1rem;          /* tweak if you want more/less */
}

/* If Daisy/Tailwind classes ever get overridden, force these too */
.bg-neutral,
.tp-soft-card {
  border-radius: 1rem;
}

/* 2) Hard-force the table+donut to sit side-by-side when space allows */
.tp-table-chart-row {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: nowrap;
}

/* Make the table area take remaining width */
.tp-table-col {
  flex: 1 1 0%;
  min-width: 0;
}

/* Keep the donut from shrinking weirdly */
.tp-chart-col {
  flex: 0 0 auto;
}

/* 3) Optional: ensure navbar stays visually solid over content */
.tp-navbar {
  background: #000;
}

/* Smaller navbar profile picture */
.tp-avatar,
nav img[alt="Profile"] {
  width: 28px !important;
  height: 28px !important;
  border-radius: 9999px !important;
  object-fit: cover !important;
}

.tp-avatar-fallback {
  width: 28px !important;
  height: 28px !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add spacing between profile picture and name */
nav .profile-block,
nav .flex.items-center.gap-3 {
  gap: 0.5rem !important;   /* adjust to your preference */
}

/* --- Navbar Styling --- */
.tp-navbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  width: 100%;
}

/* --- Center the profile block WITHOUT affecting layout --- */
.tp-center-profile {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  gap: 0.55rem;

  pointer-events: none; /* Allows clicks to pass through */
}

.tp-center-profile .tp-name {
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto; /* Name still clickable if needed */
}

/* --- Avatar sizing --- */
.tp-avatar,
.tp-avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  pointer-events: auto;
}

.tp-chart-col {
  align-self: center !important;
}

/* Clean, single source of truth for chart sizing */
.tp-donut-wrapper {
  width: 22rem;        /* adjust if you want bigger/smaller */
  height: 22rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make the canvas strictly follow the wrapper size */
.tp-donut-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* --- Make the main portfolio box clearly visible and full-width --- */
.tp-card {
  border: 1px solid #ffffff !important;   /* bright white border */
  border-radius: 1rem !important;         /* keep the rounded shape */
}

/* Force the recommended-portfolio box to stretch across the screen */
.tp-card.portfolio-container {
  width: 100% !important;
}

/* Allow the portfolio container to stretch wider than the default max width */
.portfolio-fullwidth {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Space between navbar and the first card on the portfolio page */
main.portfolio-fullwidth {
  padding-top: 2rem;   /* tweak this value if you want more/less gap */
}


/* Make the big card stretch almost edge-to-edge */
.tp-fullwidth-box {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.tp-table-chart-row {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Landing page layout for the hero module under the navbar */
.landing-page {
  min-height: calc(100vh - 80px); /* ~nav height */
  display: flex;
  flex-direction: column;
}

/* Center and size the big hero "card".
   Move it up/down by changing these margins. */
.hero-shell {
  width: 100%;
  max-width: 1200px;
  margin: 2.5rem auto 4rem;  /* top / horizontal / bottom */
}


/* Right-hand simulation panel: give it breathing room */
.hero-chart {
  min-height: 16rem;
  padding: 0 1.5rem 1.5rem 1.5rem;  /* left/right/bottom padding */
}


/* Keep the Heston text away from the card edges */
.heston-info-panel {
  padding: 0.75rem 0.75rem 0.5rem 0.75rem;
}


/* If you don't already have a body background, keep it Robinhood-dark */
body {
  background-color: #020617; /* near black / slate-950 */
}


/* Better visual styling for Heston params */
.heston-params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.heston-params span {
  padding: 4px 8px !important;
  background: rgba(148, 163, 184, 0.12) !important; /* slate-400/12 */
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.03em !important;
  display: inline-block !important;
  color: #e5e7eb !important; /* slate-200 */
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6) inset;
}

/* Bounce + glow when refreshed */
.heston-refresh {
  animation: heston-bounce 0.45s ease-out;
  color: #bef264 !important; /* lime-300 */
  border-color: #bef264 !important;
}

/* Keyframes for the bounce */
@keyframes heston-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}


/* Heston formula styling */
.heston-formula {
  font-family: 'Inter', sans-serif;
  font-size: 0.90rem;
  color: #e5e7eb !important;
  line-height: 1.6;
  font-weight: 500;
}

.heston-formula sub {
  font-size: 0.70em;
  position: relative;
  top: 0.2em;
}

/* Bell curve card subtle glow */
.bell-chart-shell {
  position: relative;
  overflow: hidden;
}

.bell-chart-shell::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      circle at 50% 10%,
      rgba(190, 242, 100, 0.20),
      rgba(15, 23, 42, 0) 70%
  );
  pointer-events: none;
  z-index: -1;
}

/* KaTeX block styling to match your dark panel */
.tp-math {
  margin-top: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.75rem;
  background: rgba(2, 6, 23, 0.35);          /* subtle slate tint */
  border: 1px solid rgba(148, 163, 184, 0.20);
}

/* Make math readable but not huge */
.tp-math .katex {
  font-size: 0.95rem;
  color: #e5e7eb;
}

/* Tighten KaTeX spacing a bit */
.tp-math .katex-display {
  margin: 0.15rem 0;
}

/* Param pills (chips) */
.tp-param-row { margin-top: 0.5rem; }

.tp-param-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;
  border-radius: 9999px;

  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e5e7eb;

  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;

  transition: transform 140ms ease, border-color 140ms ease,
              box-shadow 140ms ease, background-color 140ms ease;
}

.tp-param-pill:hover {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(190, 242, 100, 0.55);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}

/* Pulse on value update (JS toggles this) */
.tp-param-pill.tp-pulse {
  animation: tp-pill-pulse 420ms ease-out;
  border-color: rgba(206,254,3,0.85);
  box-shadow: 0 0 0 3px rgba(206,254,3,0.18);
  color: #bef264;
}

@keyframes tp-pill-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  70%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tp-param-pill { transition: none; }
  .tp-param-pill.tp-pulse { animation: none; }
}

.tp-param-pill {
  gap: 0.45rem;
}

.tp-param-symbol {
  display: inline-flex;
  align-items: center;
}

/* Make KaTeX inside pills align + size correctly */
.tp-param-pill .katex {
  font-size: 0.95rem;
  line-height: 1;
}

/* Keep numbers crisp */
.tp-param-value {
  letter-spacing: 0.02em;
}

main.portfolio-fullwidth {
  padding-top: 0.75rem !important;   /* was stacking up to ~4rem */
  padding-bottom: 2.5rem !important;
}

main.portfolio-fullwidth h2,
main.portfolio-fullwidth h3 {
  margin-top: 0 !important;
}
