/*
  YIELD B2B — Shared Styles
  Sondela Academy × TiOLi Advisory
  Colour palette: night, deep, earth, ochre, gold, cream, sand, sage, green, red
*/

/* ── Badge ── */
.badge-popular {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #C8862A;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
  line-height: 1.4;
}

/* ── Palette custom properties ── */
:root {
  --b2b-night:  #0C0B08;
  --b2b-deep:   #1E1C18;
  --b2b-earth:  #2C1A0E;
  --b2b-ochre:  #C8862A;
  --b2b-gold:   #E8A830;
  --b2b-cream:  #FAF6EE;
  --b2b-sand:   #F5E6C8;
  --b2b-sage:   #4A6741;
  --b2b-green:  #4A9A5C;
  --b2b-red:    #C04030;
  --b2b-radius: 8px;
  --b2b-transition: 0.25s ease;
}


/* ══════════════════════════════════
   TOOLTIP / POPUP SYSTEM
   ══════════════════════════════════ */

.info-trigger {
  position: relative;
  cursor: pointer;
  border-bottom: 1px dotted var(--b2b-ochre);
  color: var(--b2b-ochre);
  font-weight: 500;
}

.info-trigger:hover,
.info-trigger:focus {
  color: var(--b2b-gold);
}

/* Simple hover tooltip */
.info-trigger[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: var(--b2b-deep);
  color: var(--b2b-cream);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 8px 14px;
  border-radius: var(--b2b-radius);
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--b2b-transition), transform var(--b2b-transition);
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.info-trigger[data-tooltip]:hover::after,
.info-trigger[data-tooltip]:focus::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Rich popup panel */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 8, 0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--b2b-transition);
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--b2b-cream);
  color: var(--b2b-night);
  border-radius: 12px;
  padding: 2rem;
  max-width: 540px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 201;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--b2b-transition), transform var(--b2b-transition);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.popup-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.popup-panel .popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--b2b-deep);
  color: var(--b2b-cream);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--b2b-transition);
}

.popup-panel .popup-close:hover {
  background: var(--b2b-red);
}


/* ══════════════════════════════════
   TAB SYSTEM
   ══════════════════════════════════ */

.yield-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--b2b-sand);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.yield-tabs [role="tab"] {
  padding: 0.75rem 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(30, 28, 24, 0.55);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--b2b-transition), border-color var(--b2b-transition);
}

.yield-tabs [role="tab"]:hover {
  color: var(--b2b-earth);
}

.yield-tabs [role="tab"][aria-selected="true"] {
  color: var(--b2b-ochre);
  border-bottom-color: var(--b2b-ochre);
}

.yield-tabs [role="tabpanel"] {
  display: none;
}

.yield-tabs [role="tabpanel"].active,
[role="tabpanel"].active {
  display: block;
}


/* ══════════════════════════════════
   ACCORDION
   ══════════════════════════════════ */

.yield-accordion {
  border: 1px solid var(--b2b-sand);
  border-radius: var(--b2b-radius);
  overflow: hidden;
}

.yield-accordion + .yield-accordion {
  margin-top: 0.5rem;
}

.accord-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--b2b-cream);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--b2b-deep);
  text-align: left;
  transition: background var(--b2b-transition);
}

.accord-trigger:hover {
  background: var(--b2b-sand);
}

.accord-trigger svg,
.accord-trigger .accord-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--b2b-transition);
}

.accord-trigger[aria-expanded="true"] svg,
.accord-trigger[aria-expanded="true"] .accord-icon {
  transform: rotate(180deg);
}

.accord-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accord-panel.open {
  max-height: 600px;
}

.accord-panel-inner {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--b2b-deep);
}


/* ══════════════════════════════════
   SESSION CARDS
   ══════════════════════════════════ */

.session-card {
  background: #fff;
  border: 1px solid var(--b2b-sand);
  border-radius: var(--b2b-radius);
  padding: 1.25rem 1.5rem;
  transition: box-shadow var(--b2b-transition), transform var(--b2b-transition);
}

.session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.session-card + .session-card {
  margin-top: 1rem;
}

.session-card .session-date {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--b2b-earth);
}

.session-card .session-meta {
  font-size: 0.8125rem;
  color: rgba(30, 28, 24, 0.6);
  margin-top: 0.25rem;
}

.seat-bar {
  height: 6px;
  background: var(--b2b-sand);
  border-radius: 3px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.seat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.seat-bar-fill[data-status="open"]    { background: var(--b2b-green); }
.seat-bar-fill[data-status="filling"] { background: var(--b2b-ochre); }
.seat-bar-fill[data-status="full"]    { background: var(--b2b-red); }
.seat-bar-fill[data-status="waitlist"]{ background: var(--b2b-red); }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge[data-status="open"]     { background: rgba(74,154,92,0.15); color: var(--b2b-green); }
.status-badge[data-status="filling"]  { background: rgba(200,134,42,0.15); color: var(--b2b-ochre); }
.status-badge[data-status="full"]     { background: rgba(192,64,48,0.15); color: var(--b2b-red); }
.status-badge[data-status="waitlist"] { background: rgba(192,64,48,0.10); color: var(--b2b-red); }
.status-badge[data-status="cancelled"]{ background: rgba(30,28,24,0.08); color: rgba(30,28,24,0.45); text-decoration: line-through; }

.session-card .session-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--b2b-ochre);
}

.session-card .session-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.session-card .btn-book {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--b2b-radius);
  background: var(--b2b-ochre);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background var(--b2b-transition);
}

.session-card .btn-book:hover {
  background: var(--b2b-gold);
}

.session-card .btn-ics {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--b2b-radius);
  background: transparent;
  color: var(--b2b-deep);
  font-weight: 500;
  font-size: 0.8125rem;
  border: 1px solid var(--b2b-sand);
  cursor: pointer;
  transition: border-color var(--b2b-transition), color var(--b2b-transition);
}

.session-card .btn-ics:hover {
  border-color: var(--b2b-ochre);
  color: var(--b2b-ochre);
}


/* ══════════════════════════════════
   PATHWAY CARDS
   ══════════════════════════════════ */

.pathway-card {
  background: #fff;
  border: 1px solid var(--b2b-sand);
  border-radius: var(--b2b-radius);
  padding: 1.5rem;
  transition: box-shadow var(--b2b-transition), transform var(--b2b-transition);
}

.pathway-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.pathway-card .pathway-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--b2b-earth);
  margin-bottom: 0.5rem;
}

.pathway-card .pathway-subtitle {
  font-size: 0.875rem;
  color: rgba(30,28,24,0.6);
  margin-bottom: 1rem;
}

.pathway-card .pathway-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--b2b-ochre);
}

.pathway-expanded {
  background: var(--b2b-cream);
  border: 1px solid var(--b2b-sand);
  border-radius: var(--b2b-radius);
  padding: 1.5rem;
  margin-top: 1rem;
  display: none;
}

.pathway-expanded.active {
  display: block;
}


/* ══════════════════════════════════
   STAT BAR
   ══════════════════════════════════ */

.stat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--b2b-deep);
  border-radius: var(--b2b-radius);
}

.stat-item {
  flex: 1 1 140px;
  text-align: center;
}

.stat-item .stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--b2b-gold);
  line-height: 1.2;
}

.stat-item .stat-label {
  font-size: 0.8125rem;
  color: rgba(250,246,238,0.65);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.stat-item .stat-source {
  font-size: 0.6875rem;
  color: rgba(250,246,238,0.35);
  margin-top: 0.15rem;
  font-style: italic;
}


/* ══════════════════════════════════
   INCENTIVE STACK SLIDER
   ══════════════════════════════════ */

.incentive-stack {
  background: var(--b2b-cream);
  border: 1px solid var(--b2b-sand);
  border-radius: var(--b2b-radius);
  padding: 1.5rem;
}

.incentive-stack .stack-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--b2b-deep);
  margin-bottom: 0.75rem;
}

.incentive-stack input[type="range"] {
  width: 100%;
  accent-color: var(--b2b-ochre);
  cursor: pointer;
}

.incentive-stack .stack-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.stack-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stack-bar .bar-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--b2b-deep);
  width: 80px;
  flex-shrink: 0;
}

.stack-bar .bar-track {
  flex: 1;
  height: 18px;
  background: var(--b2b-sand);
  border-radius: 9px;
  overflow: hidden;
}

.stack-bar .bar-fill {
  height: 100%;
  border-radius: 9px;
  transition: width 0.5s ease;
}

.stack-bar .bar-fill.s12h { background: var(--b2b-sage); }
.stack-bar .bar-fill.eti  { background: var(--b2b-green); }
.stack-bar .bar-fill.sdl  { background: var(--b2b-ochre); }

.stack-bar .bar-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--b2b-deep);
  width: 90px;
  text-align: right;
  flex-shrink: 0;
}

.incentive-stack .stack-total {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--b2b-ochre);
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--b2b-ochre);
  text-align: right;
}


/* ══════════════════════════════════
   SVG FLOW ANIMATION
   ══════════════════════════════════ */

.flow-node {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.flow-arrow {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 0.8s ease;
}

.flow-node.animate {
  opacity: 1;
  transform: translateY(0);
}

.flow-arrow.animate {
  stroke-dashoffset: 0;
}

/* Stagger children */
.flow-node:nth-child(2) { transition-delay: 0.15s; }
.flow-node:nth-child(3) { transition-delay: 0.30s; }
.flow-node:nth-child(4) { transition-delay: 0.45s; }
.flow-node:nth-child(5) { transition-delay: 0.60s; }
.flow-node:nth-child(6) { transition-delay: 0.75s; }

.flow-arrow:nth-of-type(2) { transition-delay: 0.20s; }
.flow-arrow:nth-of-type(3) { transition-delay: 0.40s; }
.flow-arrow:nth-of-type(4) { transition-delay: 0.60s; }
.flow-arrow:nth-of-type(5) { transition-delay: 0.80s; }


/* ══════════════════════════════════
   QUALIFIER WIDGET
   ══════════════════════════════════ */

.qualifier {
  background: var(--b2b-cream);
  border: 1px solid var(--b2b-sand);
  border-radius: var(--b2b-radius);
  padding: 1.5rem;
}

.qualifier .qualifier-question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--b2b-deep);
  margin-bottom: 0.75rem;
}

.qualifier .qualifier-options {
  display: flex;
  gap: 0.75rem;
}

.qualifier .qualifier-options button {
  padding: 0.5rem 1.5rem;
  border-radius: var(--b2b-radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 2px solid var(--b2b-sand);
  background: #fff;
  color: var(--b2b-deep);
  transition: all var(--b2b-transition);
}

.qualifier .qualifier-options button:hover {
  border-color: var(--b2b-ochre);
  color: var(--b2b-ochre);
}

.qualifier .qualifier-options button.selected-yes {
  border-color: var(--b2b-green);
  background: var(--b2b-green);
  color: #fff;
}

.qualifier .qualifier-options button.selected-no {
  border-color: var(--b2b-red);
  background: var(--b2b-red);
  color: #fff;
}

.qualifier .qualifier-result {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--b2b-radius);
  font-size: 0.875rem;
  line-height: 1.5;
  display: none;
}

.qualifier .qualifier-result.pass {
  display: block;
  background: rgba(74,154,92,0.1);
  color: var(--b2b-sage);
  border: 1px solid rgba(74,154,92,0.25);
}

.qualifier .qualifier-result.fail {
  display: block;
  background: rgba(192,64,48,0.08);
  color: var(--b2b-red);
  border: 1px solid rgba(192,64,48,0.2);
}


/* ══════════════════════════════════
   BOOKING MODAL
   ══════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 8, 0.65);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--b2b-transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.booking-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  border-radius: 12px;
  padding: 0;
  width: 90vw;
  max-width: 640px;
  max-height: 85vh;
  overflow: hidden;
  z-index: 301;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--b2b-transition), transform var(--b2b-transition);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.booking-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.booking-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--b2b-deep);
  color: var(--b2b-cream);
}

.booking-modal .modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.booking-modal .modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: var(--b2b-cream);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--b2b-transition);
}

.booking-modal .modal-close:hover {
  background: var(--b2b-red);
}

.booking-modal .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}

.booking-modal .modal-body iframe {
  width: 100%;
  min-height: 500px;
  border: none;
  border-radius: var(--b2b-radius);
}

.booking-modal .modal-body .mailto-fallback {
  text-align: center;
  padding: 2rem 1rem;
}

.booking-modal .modal-body .mailto-fallback a {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--b2b-ochre);
  color: #fff;
  border-radius: var(--b2b-radius);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--b2b-transition);
}

.booking-modal .modal-body .mailto-fallback a:hover {
  background: var(--b2b-gold);
}


/* ══════════════════════════════════
   STICKY SCROLL INDICATOR
   ══════════════════════════════════ */

.scroll-indicator {
  position: sticky;
  top: 64px; /* below nav bar */
  z-index: 40;
  background: var(--b2b-deep);
  padding: 0.5rem 1.5rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid rgba(200,134,42,0.15);
}

.scroll-indicator a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(250,246,238,0.45);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--b2b-transition), border-color var(--b2b-transition);
}

.scroll-indicator a:hover {
  color: var(--b2b-cream);
}

.scroll-indicator a.active {
  color: var(--b2b-gold);
  border-bottom-color: var(--b2b-gold);
}


/* ══════════════════════════════════
   UTILITY / RESPONSIVE
   ══════════════════════════════════ */

@media (max-width: 640px) {
  .stat-bar {
    padding: 1rem;
    gap: 1rem;
  }
  .stat-item .stat-number {
    font-size: 1.375rem;
  }
  .incentive-stack .stack-total {
    font-size: 1.25rem;
  }
  .scroll-indicator {
    padding: 0.4rem 1rem;
  }
  .stack-bar .bar-label {
    width: 60px;
    font-size: 0.75rem;
  }
  .stack-bar .bar-value {
    width: 70px;
    font-size: 0.8125rem;
  }
}
