/* @section:teaching - Tooltips, Education, Win Rate, Vol Cone */

/* Teaching Tooltips - Minimal, consistent with system */
.teaching-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.tip-icon {
  width: 11px;
  height: 11px;
  background: #64748b;
  color: #fff;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 600;
  margin-left: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  cursor: help;
  vertical-align: middle;
}

.teaching-tooltip:hover .tip-icon,
.opt-stat:hover .tip-icon {
  opacity: 0.7;
}

.tip-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: #1e293b;
  color: #94a3b8;
  padding: 10px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s;
  pointer-events: none;
  font-size: 10px;
  line-height: 1.5;
  text-transform: none;
}

.tip-popup::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 12px;
  border: 5px solid transparent;
  border-bottom-color: #1e293b;
}

/* Stat bar tooltips - wider for dynamic content */
.opt-stat .tip-popup {
  width: 280px;
  max-height: 400px;
}

.opt-stat .tip-popup::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 20px;
  border: 5px solid transparent;
  border-bottom-color: #1e293b;
}

/* Right-aligned tooltips for rightmost stats */
.opt-stat:nth-child(n+5) .tip-popup,
.tip-popup.tip-right {
  left: auto;
  right: 0;
}

.opt-stat:nth-child(n+5) .tip-popup::before,
.tip-popup.tip-right::before {
  left: auto;
  right: 12px;
}

.teaching-tooltip:hover .tip-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Show tooltip when hovering stats with ? icon */
.opt-stat:has(.tip-icon):hover .tip-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tip-title {
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 4px;
  text-transform: none;
}

.tip-short {
  color: #64748b;
  margin-bottom: 8px;
}

.tip-detail {
  white-space: pre-line;
  margin-bottom: 8px;
}

.tip-detail strong {
  color: #e2e8f0;
  display: block;
  margin-top: 8px;
  margin-bottom: 2px;
}

.tip-detail strong:first-child {
  margin-top: 0;
}

.tip-quote {
  font-style: italic;
  color: #64748b;
  margin-bottom: 6px;
}

.tip-source {
  font-size: 9px;
  color: #475569;
}

/* Three Lenses Framework */
.three-lenses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.lens-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lens-card:hover {
  border-color: #818cf8;
  box-shadow: 0 2px 8px rgba(129, 140, 248, 0.1);
}

.lens-icon { font-size: 20px; margin-bottom: 6px; }
.lens-name { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.lens-question { font-size: 10px; color: #94a3b8; margin-bottom: 8px; font-style: italic; }
.lens-value { font-size: 12px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.lens-signal { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; display: inline-block; }
.lens-signal.expensive { background: #fef3c7; color: #d97706; }
.lens-signal.cheap { background: #d1fae5; color: #059669; }
.lens-signal.high { background: #fee2e2; color: #dc2626; }
.lens-signal.low { background: #d1fae5; color: #059669; }
.lens-signal.normal { background: #e2e8f0; color: #64748b; }

/* Win Rate Reality Check Box */
.winrate-box {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
  color: #fff;
}

.winrate-title {
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.winrate-title::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #fbbf24;
  color: #1e1b4b;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.winrate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.winrate-stat {
  text-align: center;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.winrate-label { font-size: 9px; color: #c4b5fd; margin-bottom: 4px; }
.winrate-value { font-size: 20px; font-weight: 800; }
.winrate-value.buyer { color: #f87171; }
.winrate-value.seller { color: #34d399; }

.winrate-insight {
  font-size: 10px;
  line-height: 1.5;
  color: #e2e8f0;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border-left: 3px solid #fbbf24;
}

/* Edge Source Indicator */
.edge-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #818cf8;
  margin-top: 10px;
}

.edge-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.edge-badge.distributional { background: #fef3c7; color: #d97706; }
.edge-badge.vrp { background: #d1fae5; color: #059669; }
.edge-badge.surface { background: #dbeafe; color: #2563eb; }
.edge-badge.mixed { background: #e2e8f0; color: #64748b; }
.edge-desc { font-size: 10px; color: #64748b; }

/* Volatility Cone Visualization */
.vol-cone { margin-top: 12px; }

.cone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cone-period {
  font-size: 10px;
  color: #64748b;
  width: 50px;
  flex-shrink: 0;
}

.cone-bar-container {
  flex: 1;
  height: 20px;
  background: #e2e8f0;
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.cone-range {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #dbeafe 0%, #93c5fd 50%, #dbeafe 100%);
  border-radius: 4px;
}

.cone-current {
  position: absolute;
  width: 4px;
  height: 24px;
  background: #ef4444;
  border-radius: 2px;
  top: -2px;
  transform: translateX(-50%);
}

.cone-iv-marker {
  position: absolute;
  width: 4px;
  height: 24px;
  background: #818cf8;
  border-radius: 2px;
  top: -2px;
  transform: translateX(-50%);
}

.cone-percentile {
  font-size: 10px;
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

.cone-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 9px;
  color: #64748b;
}

.cone-legend-item { display: flex; align-items: center; gap: 4px; }
.cone-legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.cone-legend-dot.rv { background: #ef4444; }
.cone-legend-dot.iv { background: #818cf8; }
.cone-legend-dot.range { background: #93c5fd; }

/* Educational Alerts */
.edu-alert {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.edu-alert.opportunity {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
}

.edu-alert.info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #3b82f6;
}

.edu-alert.warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
}

.edu-alert-icon { font-size: 18px; flex-shrink: 0; }
.edu-alert-content { flex: 1; }
.edu-alert-title { font-size: 11px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.edu-alert-message { font-size: 10px; color: #475569; line-height: 1.5; }
.edu-alert-tip {
  font-size: 9px;
  color: #64748b;
  font-style: italic;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed currentColor;
}

/* Position Sizing Guidance */
.sizing-guidance {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}

.sizing-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sizing-icon { font-size: 16px; }
.sizing-title { font-size: 11px; font-weight: 700; color: #92400e; }
.sizing-content { font-size: 10px; line-height: 1.5; color: #78350f; }
.sizing-quote {
  font-style: italic;
  margin-top: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 6px;
}

/* Straddle Win Rate Visual */
.straddle-winrate-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.straddle-winrate-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.straddle-winrate-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.straddle-winrate-bars {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.winrate-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

.winrate-bar.buyer { background: linear-gradient(135deg, #f87171 0%, #ef4444 100%); }
.winrate-bar.seller { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); }

.straddle-winrate-note {
  font-size: 9px;
  color: #64748b;
  line-height: 1.5;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
}

/* Enhanced opt-subsection hints with info icon */
.opt-subsection-hint.has-icon {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.opt-subsection-hint.has-icon::before {
  content: 'i';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
