/* ─────────────────────────────────────────────────────
   How-to-trade page — widget & component styles
   Loaded only on /how-to-trade/
   ───────────────────────────────────────────────────── */

/* ── Widget base ──────────────────────────────────────── */

.widget-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.widget-box__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7280;
  margin: 0 0 1rem;
}

/* ── Session clock ────────────────────────────────────── */

.clock-time {
  font-size: 2.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #111;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.clock-time span {
  font-size: 1.4rem;
  font-weight: 400;
  color: #6b7280;
  margin-left: 0.25rem;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.session-badge--best   { background: #dcfce7; color: #15803d; }
.session-badge--good   { background: #dbeafe; color: #1d4ed8; }
.session-badge--decent { background: #ede9fe; color: #6d28d9; }
.session-badge--avoid  { background: #fef9c3; color: #854d0e; }
.session-badge--closed { background: #f3f4f6; color: #6b7280; }

.session-verdict {
  font-size: 0.875rem;
  color: #374151;
  margin: 0 0 1.25rem;
  line-height: 1.55;
}

.session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.session-table th {
  text-align: left;
  padding: 0.35rem 0.5rem;
  color: #6b7280;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.session-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.session-table tr.is-active td {
  background: #f0fdf4;
  font-weight: 600;
  color: #15803d;
}

.session-active-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00c853;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── Break-even calculator ────────────────────────────── */

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 540px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
  display: block;
}

.calc-sub {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  display: block;
}

.calc-slider {
  width: 100%;
  accent-color: #00c853;
  cursor: pointer;
}

.calc-value-display {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}

.calc-result-box {
  background: #fff;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem;
}

.calc-result-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.calc-result-value {
  font-size: 2rem;
  font-weight: 800;
  color: #15803d;
  line-height: 1;
}

.calc-result-sub {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 0.35rem;
  line-height: 1.45;
}

/* ── Trade size calculator ────────────────────────────── */

.ts-row {
  margin-bottom: 1rem;
}

.ts-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.ts-result {
  background: #fff;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.ts-result__main {
  font-size: 1.75rem;
  font-weight: 800;
  color: #15803d;
  line-height: 1;
}

.ts-result__usd {
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  margin-left: 0.5rem;
}

.ts-note {
  font-size: 0.78rem;
  color: #92400e;
  background: #fef3c7;
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  display: none;
}

/* ── Candlestick pattern cards ────────────────────────── */

.candle-patterns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (max-width: 580px) {
  .candle-patterns {
    grid-template-columns: 1fr;
  }
}

.candle-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: #fff;
}

.candle-card__name {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.6rem 0 0.2rem;
  color: #111;
}

.candle-card__signal {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.candle-card__signal--neutral { background: #fef9c3; color: #854d0e; }
.candle-card__signal--bull    { background: #dcfce7; color: #15803d; }
.candle-card__signal--bear    { background: #fee2e2; color: #b91c1c; }

.candle-card__desc {
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.5;
  text-align: left;
}

/* ── Emotional trading checklist ──────────────────────── */

.emotion-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.emotion-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.45;
  cursor: pointer;
}

.emotion-list input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #ef4444;
  cursor: pointer;
}

.emotion-counter {
  font-size: 0.83rem;
  font-weight: 600;
  color: #6b7280;
  margin-top: 0.5rem;
}

.emotion-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  margin-top: 0.75rem;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
}

/* ── Numbered summary steps ───────────────────────────── */

.summary-steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  counter-reset: step;
}

.summary-steps li {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #f3f4f6;
  counter-increment: step;
}

.summary-steps li::before {
  content: counter(step);
  min-width: 2rem;
  height: 2rem;
  background: #00c853;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.summary-step__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111;
}

.summary-step__detail {
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: 0.15rem;
  line-height: 1.45;
}

/* ── Mobile hero CTA ──────────────────────────────────── */
/* Matches codebase pattern: hide on desktop via min-width */

.mobile-hero-cta {
  margin: 1.25rem 0 1.5rem;
}

@media (min-width: 980px) {
  .mobile-hero-cta {
    display: none;
  }
}

.mobile-hero-cta .demo-banner__cta {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  text-align: center;
}

.mobile-hero-cta .demo-banner__fine {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
}
