/* ═══════════════════════════════════════════════
   exam-bonus.css — discount gate, spin, countdown
   ═══════════════════════════════════════════════ */

/* Result area blurred while lead gate is open */
.result-gate-blur {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.55s ease;
}

/* Lead capture section → fixed modal overlay */
#leadCaptureArea.gate-modal-active {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(10, 15, 40, 0.72) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  padding: 20px !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding-top: 32px !important;
}

/* ── Generic overlay backdrop ── */
.eb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 40, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  overflow-y: auto;
}

/* ── Course cards in result actions ── */
.eb-courses-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

/* ── Diploma CTA (ready students) ── */
.eb-diploma-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.32);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.eb-diploma-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(22, 163, 74, 0.38); }
.eb-diploma-cta:active { transform: translateY(0); }

.eb-course-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
  font-family: inherit;
}
.eb-course-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.14);
  transform: translateY(-1px);
}
.eb-course-card:active { transform: translateY(0); }

.eb-cc-info { flex: 1; min-width: 0; }

.eb-cc-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-cc-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

.eb-cc-price-wrap {
  text-align: right;
  white-space: nowrap;
}

.eb-cc-orig {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: line-through;
  line-height: 1.2;
}

.eb-cc-price {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #16a34a;
  line-height: 1.2;
}

.eb-cc-arrow {
  color: #6366f1;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Spin wheel card ── */
.eb-spin-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.eb-spin-tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.eb-spin-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}

.eb-spin-card > p {
  font-size: 0.87rem;
  color: #64748b;
  margin: 0 0 22px;
}

/* Wheel wrap */
.eb-wheel-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 22px;
}

.eb-spin-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.7rem;
  z-index: 10;
  color: #1e293b;
  line-height: 1;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

/* The wheel is now a container that rotates */
.eb-wheel {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  position: relative;
  border: 6px solid #fff;
  box-shadow: 0 0 0 3px #e2e8f0, 0 8px 28px rgba(0, 0, 0, 0.22);
}

/* Disk inside the wheel */
.eb-wheel-disk {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    #ef4444   0deg  45deg,
    #f59e0b  45deg  90deg,
    #3b82f6  90deg 135deg,
    #16a34a 135deg 180deg,
    #8b5cf6 180deg 225deg,
    #ec4899 225deg 270deg,
    #14b8a6 270deg 315deg,
    #d97706 315deg 360deg
  );
}

/* Center dot */
.eb-wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

/* Segment labels */
.eb-wl {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  z-index: 2;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1;
}

.eb-wl-win { font-size: 0.78rem; }

/* Spin transition */
.eb-wheel.is-spinning {
  transform: rotate(2002.5deg);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Spin / Claim buttons */
.eb-spin-btn,
.eb-claim-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
}

.eb-spin-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
}
.eb-spin-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.eb-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.eb-claim-btn {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
}
.eb-claim-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.eb-claim-btn:active { transform: translateY(0); }

/* Spin result reveal */
.eb-spin-result { margin-top: 20px; }

.eb-win-emoji { font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }

.eb-win-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.eb-win-amount {
  font-size: 3rem;
  font-weight: 900;
  color: #16a34a;
  line-height: 1;
  margin-bottom: 8px;
}

.eb-spin-result > p {
  font-size: 0.86rem;
  color: #475569;
  margin: 0 0 16px;
}

/* ── Countdown bar ── */
.eb-discount-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 100%);
  color: #fff;
}

.eb-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 20px;
  flex-wrap: wrap;
}

.eb-bar-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}

.eb-bar-timer {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 2px 8px;
  min-width: 48px;
  text-align: center;
}

.eb-bar-cta {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}
.eb-bar-cta:hover { background: #15803d; }

.eb-bar-track { height: 3px; background: rgba(255, 255, 255, 0.1); }

.eb-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #16a34a 100%);
  transition: width 1s linear;
}

.has-discount-bar { padding-top: 50px; }

/* ── Payment modal ── */
.eb-pay-overlay {
  align-items: flex-start;
  padding-top: 70px;
  padding-bottom: 40px;
}

.eb-pay-card {
  background: #fff;
  border-radius: 20px;
  padding: 26px 24px 30px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.eb-pay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-family: inherit;
  transition: background 0.15s;
  line-height: 1;
}
.eb-pay-close:hover { background: #e2e8f0; }

.eb-pay-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 99px;
  margin-bottom: 7px;
  letter-spacing: 0.04em;
}
.eb-pay-badge.is-extra { background: #fef3c7; color: #92400e; }

.eb-pay-header { margin-bottom: 14px; }

.eb-pay-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
}

.eb-pay-extra-note {
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 600;
  margin: 4px 0 0;
}

/* Course tabs in payment modal */
.eb-course-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.eb-course-tabs::-webkit-scrollbar { display: none; }

.eb-course-tab {
  flex: 1;
  min-width: 90px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 5px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
}
.eb-course-tab strong { display: block; color: #0f172a; font-size: 0.8rem; font-weight: 700; margin-bottom: 2px; }
.eb-course-tab.active { border-color: #6366f1; background: #eef2ff; color: #4f46e5; }
.eb-course-tab.active strong { color: #4338ca; }

.eb-pay-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
}

.eb-pay-orig { font-size: 0.9rem; color: #94a3b8; text-decoration: line-through; }
.eb-pay-now  { font-size: 1.75rem; font-weight: 900; color: #16a34a; line-height: 1; }

/* Method tabs */
.eb-pay-course-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.eb-pay-method-tabs { display: flex; gap: 6px; margin-bottom: 12px; }

.eb-pay-tab {
  flex: 1;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: #475569;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.eb-pay-tab.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.eb-pay-tab:hover:not(.active) { background: #e2e8f0; }

/* Method panel (Instapay / Vodafone) */
.eb-method-panel { margin-bottom: 14px; }

.eb-pay-identity {
  border-radius: 12px;
  border: 1px solid rgba(30,58,138,0.2);
  background: rgba(239,246,255,0.6);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.eb-identity-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a8a;
  margin: 0 0 7px;
}

.eb-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.eb-copy-target {
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.34);
  background: rgba(248,250,252,0.95);
  padding: 9px 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 700;
  word-break: break-all;
  text-align: center;
}

.eb-copy-btn {
  border-radius: 8px;
  border: 1px solid rgba(30,58,138,0.28);
  background: rgba(224,231,255,0.7);
  color: #1e3a8a;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.eb-copy-btn:hover { background: #1e3a8a; color: #fff; }

.eb-qr-wrap {
  display: grid;
  justify-content: center;
  gap: 6px;
}

.eb-qr-label {
  text-align: center;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eb-qr-frame {
  width: min(200px, 100%);
  margin-inline: auto;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.3);
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(15,23,42,0.08);
}
.eb-qr-frame img {
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  display: block;
}

/* Confirm enrollment section */
.eb-confirm-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: 4px;
}

.eb-confirm-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.eb-confirm-header i { color: #16a34a; }

.eb-confirm-fields {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.eb-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
}
.eb-input:focus { border-color: #6366f1; }
.eb-input::placeholder { color: #94a3b8; }
.eb-input[aria-invalid="true"] { border-color: #dc2626; }

.eb-file-zone {
  display: grid;
  gap: 3px;
  text-align: center;
  border: 2px dashed rgba(148,163,184,0.5);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.eb-file-zone:hover { border-color: #6366f1; background: rgba(238,242,255,0.6); }
.eb-file-zone i { font-size: 1.2rem; color: #6366f1; }
.eb-file-zone span { font-size: 0.82rem; font-weight: 700; color: #334155; }
.eb-file-zone small { font-size: 0.72rem; color: #94a3b8; font-weight: 600; }

.eb-file-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.eb-confirm-btn {
  width: 100%;
  background: linear-gradient(125deg, #15803d 0%, #16a34a 50%, #14532d 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 8px;
  box-shadow: 0 8px 20px rgba(21,128,61,0.24);
}
.eb-confirm-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.eb-confirm-btn:active { transform: translateY(0); }
.eb-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.eb-secure-note {
  text-align: center;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.eb-secure-note i { color: #16a34a; }

/* ── Extra 10% off popup ── */
.eb-extra-overlay { z-index: 1001; }

.eb-extra-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  position: relative;
}

.eb-extra-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-family: inherit;
  transition: background 0.15s;
}
.eb-extra-close:hover { background: #e2e8f0; }

.eb-extra-emoji { font-size: 2.2rem; margin-bottom: 10px; }

.eb-extra-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

.eb-extra-card > p {
  font-size: 0.87rem;
  color: #475569;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* Price comparison rows inside extra popup */
.eb-extra-courses {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  text-align: left;
}

.eb-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.87rem;
  border-bottom: 1px dashed #e2e8f0;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.1s;
}
.eb-extra-row:last-child { border-bottom: none; }
.eb-extra-row:hover { background: #eef2ff; }

.eb-extra-row-name { font-weight: 600; color: #334155; }
.eb-extra-row-prices { display: flex; align-items: center; gap: 8px; }
.eb-extra-row-orig { color: #94a3b8; text-decoration: line-through; font-size: 0.8rem; }
.eb-extra-row-new  { color: #16a34a; font-weight: 800; font-size: 0.95rem; }
.eb-extra-row-arrow { color: #6366f1; font-size: 0.8rem; }

.eb-extra-claim-btn {
  width: 100%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 10px;
  transition: opacity 0.2s, transform 0.1s;
}
.eb-extra-claim-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.eb-extra-claim-btn:active { transform: translateY(0); }

.eb-extra-decline {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  padding: 4px;
}
.eb-extra-decline:hover { color: #64748b; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .eb-bar-label { display: none; }
  .eb-bar-inner { gap: 8px; padding: 7px 12px; }
  .has-discount-bar { padding-top: 44px; }

  .eb-pay-overlay { padding-top: 56px; }
  .eb-pay-card { padding: 20px 16px 24px; }

  .eb-course-tab strong { font-size: 0.72rem; }

  .eb-spin-card { padding: 22px 16px 26px; }
  .eb-wheel-wrap, .eb-wheel { width: 200px; height: 200px; }

  .eb-qr-frame { width: min(170px, 100%); }
  .eb-confirm-fields { grid-template-columns: 1fr; }

  /* Lead gate: switch to top-aligned scroll so card never clips off-screen */
  #leadCaptureArea.gate-modal-active {
    align-items: flex-start !important;
    padding: 12px !important;
    padding-top: 16px !important;
  }
}
