/* ============================================================
   SchoolNotes — Dynamic Checkout Modal CSS
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
.co-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) {
  .co-overlay { align-items: center; }
}
.co-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 11, 26, .72);
  backdrop-filter: blur(6px);
  animation: co-fade-in .28s ease;
}
.co-overlay[hidden] { display: none !important; }

/* Slide-up drawer */
.co-drawer {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  max-height: 96vh; overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -20px 80px rgba(0,0,0,.4);
  transform: translateY(40px); opacity: 0;
  transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .28s ease;
  scrollbar-width: thin;
}
@media (min-width: 640px) {
  .co-drawer {
    border-radius: 28px;
    max-height: 90vh;
    transform: translateY(20px) scale(.97);
  }
}
.co-overlay.open .co-drawer {
  transform: translateY(0) scale(1); opacity: 1;
}

/* ── Header ──────────────────────────────────────────────── */
.co-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #f0ede6;
  position: sticky; top: 0; background: #fff; z-index: 2;
  border-radius: 28px 28px 0 0;
}
.co-head-left { display: flex; align-items: center; gap: 11px; }
.co-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, #131c42, #070b1a);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 6px 16px rgba(11,17,48,.28);
}
.co-head-title { font-weight: 800; font-size: 16px; color: #0b1130; line-height: 1.2; }
.co-head-sub   { font-size: 11.5px; color: #8890a3; font-weight: 500; }
.co-close {
  width: 36px; height: 36px; border: 1.5px solid #e9e6de; border-radius: 50%;
  background: #fff; color: #5c6172; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s;
  flex-shrink: 0;
}
.co-close:hover { background: #f5f3ee; border-color: #c0bdb5; color: #0b1130; }

/* ── Step indicator ──────────────────────────────────────── */
.co-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 14px 22px 0;
}
.co-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 64px;
}
.co-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #e9e6de; background: #fff;
  color: #8890a3; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.co-step-lbl { font-size: 11px; color: #8890a3; font-weight: 600; }
.co-step.active .co-step-num { border-color: #eab030; background: #eab030; color: #0b1130; }
.co-step.active .co-step-lbl { color: #0b1130; font-weight: 700; }
.co-step.done .co-step-num   { border-color: #1fb361; background: #1fb361; color: #fff; }
.co-step.done .co-step-num::before { content: '✓'; }
.co-step.done .co-step-num  { font-size: 0; }
.co-step.done .co-step-num::before { font-size: 14px; }
.co-step-line {
  flex: 1; height: 2px; background: #e9e6de; border-radius: 2px; margin: 0 4px;
  margin-bottom: 14px; /* align with circles */
}

/* ── Live price bar ──────────────────────────────────────── */
.co-price-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 22px 0;
  background: linear-gradient(135deg, #0b1130, #1b2657);
  border-radius: 14px; padding: 12px 16px;
  color: #fff;
}
.co-price-tag {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 26px;
  color: #f7cd5a; line-height: 1; transition: all .25s ease;
}
.co-price-desc { font-size: 12px; color: #b9c0dc; margin-top: 2px; }
.co-badge-save {
  background: linear-gradient(120deg, #eab030, #f7cd5a);
  color: #0b1130; border-radius: 999px;
  padding: 5px 12px; font-weight: 800; font-size: 12px;
  white-space: nowrap;
}

/* ── Body / panels ───────────────────────────────────────── */
.co-body { padding: 18px 22px 24px; }
.co-panel { display: none; }
.co-panel.active { display: block; animation: co-slide-in .22s ease; }
@keyframes co-slide-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes co-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}

.co-section-title {
  font-weight: 800; font-size: 15px; color: #0b1130;
  margin: 0 0 14px; letter-spacing: -.2px;
}

/* ── Package cards grid ──────────────────────────────────── */
.co-pkg-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.co-pkg-card {
  border: 2px solid #e9e6de; border-radius: 14px; padding: 14px 12px 12px;
  cursor: pointer; transition: .18s; background: #fff; position: relative;
  display: flex; flex-direction: column; gap: 3px;
}
.co-pkg-card:hover { border-color: #eab030; background: #fffaf0; }
.co-pkg-card.selected {
  border-color: #eab030; background: linear-gradient(135deg, #fffef5, #fffaf0);
  box-shadow: 0 0 0 3px rgba(234,176,48,.18);
}
.co-pkg-card input[type=radio] { display: none; }
.co-pkg-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.co-pkg-icon { font-size: 22px; }
.co-pkg-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  background: #0b1130; color: #f7cd5a;
  border-radius: 6px; padding: 3px 6px;
}
.co-pkg-card.selected .co-pkg-tag { background: #eab030; color: #0b1130; }
.co-pkg-name { font-weight: 700; font-size: 12.5px; color: #0b1130; line-height: 1.3; }
.co-pkg-desc { font-size: 11px; color: #8890a3; margin-top: 1px; }
.co-pkg-price {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 17px;
  color: #0b1130; margin-top: 6px;
}
.co-pkg-card.selected .co-pkg-price { color: #c98f16; }
/* Checkmark on selected card */
.co-pkg-card.selected::after {
  content: '✓'; position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #eab030; color: #0b1130;
  font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

/* ── Field groups / selects / checkboxes ─────────────────── */
.co-field-group { margin-bottom: 12px; }
.co-label {
  display: block; font-weight: 700; font-size: 12.5px; color: #5c6172;
  margin-bottom: 6px; letter-spacing: .2px;
}
.co-label-hint { font-weight: 500; font-size: 11px; color: #c98f16; }
.co-select-wrap { position: relative; }
.co-select {
  width: 100%; padding: 11px 36px 11px 13px;
  border: 1.5px solid #e9e6de; border-radius: 12px;
  font: inherit; font-size: 14px; color: #101425;
  background: #fff; appearance: none; cursor: pointer;
  transition: .15s;
}
.co-select:focus { outline: none; border-color: #eab030; box-shadow: 0 0 0 3px rgba(234,176,48,.14); }
.co-select-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #8890a3; font-size: 13px; pointer-events: none;
}

/* Checkbox pills */
.co-checkbox-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
}
@media (max-width: 380px) {
  .co-checkbox-grid { grid-template-columns: repeat(3, 1fr); }
}
.co-check-pill {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 4px; border: 1.5px solid #e9e6de; border-radius: 10px;
  cursor: pointer; font-size: 12px; font-weight: 600; color: #5c6172;
  transition: .15s; background: #fff; text-align: center;
}
.co-check-pill:hover { border-color: #eab030; color: #0b1130; }
.co-check-pill input { display: none; }
.co-check-pill:has(input:checked) {
  border-color: #eab030; background: #fffaf0;
  color: #0b1130; box-shadow: 0 0 0 2px rgba(234,176,48,.2);
}
.co-multi-price-note {
  font-size: 12px; font-weight: 700; color: #c98f16;
  margin-top: 8px; padding: 7px 11px;
  background: #fffaf0; border-radius: 8px; border: 1px solid #ffe8a8;
}

/* ── Summary box ─────────────────────────────────────────── */
.co-summary-box {
  background: #f8f6f0; border: 1px solid #ede9df; border-radius: 14px;
  padding: 14px 16px; margin: 14px 0 16px;
}
.co-sum-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0; color: #5c6172;
}
.co-sum-row span:last-child { font-weight: 600; color: #101425; text-align: right; max-width: 60%; }
.co-sum-divider { border: none; border-top: 1px dashed #ded9ce; margin: 8px 0; }
.co-sum-total { font-weight: 800; font-size: 15px; }
.co-sum-total span { color: #0b1130 !important; }
.co-sum-total span:last-child { color: #c98f16 !important; font-family: 'Poppins', sans-serif; font-size: 18px; }

/* ── Step 2: form ────────────────────────────────────────── */
.co-form-grid { display: grid; gap: 12px; margin-bottom: 14px; }
.co-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #e9e6de; border-radius: 12px;
  font: inherit; font-size: 15px; color: #101425; background: #fff;
  transition: .15s;
}
.co-input:focus { outline: none; border-color: #0b1130; box-shadow: 0 0 0 3px rgba(11,17,48,.08); }
.co-err { display: block; font-size: 11.5px; color: #d64545; margin-top: 4px; font-weight: 600; }

.co-trust-strip {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; font-weight: 700; color: #5c6172;
  padding: 10px 0 14px;
}
.co-trust-strip span::before { margin-right: 3px; }

/* ── Step 3: review card ─────────────────────────────────── */
.co-review-card {
  background: #f8f6f0; border: 1px solid #ede9df; border-radius: 14px;
  padding: 16px 18px; margin-bottom: 2px;
}
.co-review-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 13px; padding: 5px 0; color: #5c6172;
}
.co-rl { flex-shrink: 0; width: 70px; }
.co-rv { font-weight: 600; color: #101425; text-align: right; max-width: 64%; word-break: break-word; }
.co-rv-price { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 20px; color: #c98f16 !important; }
.co-review-divider { border: none; border-top: 1px dashed #ded9ce; margin: 8px 0; }
.co-review-total { font-weight: 800; font-size: 15px; }
.co-secure-note {
  text-align: center; font-size: 11.5px; color: #8890a3;
  margin-top: 12px; line-height: 1.5;
}
.co-no-gateway {
  background: #fff7e6; border: 1px solid #ffe3a3; border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: #7a4f06;
  margin: 10px 0;
}

/* ── Buttons inside modal ────────────────────────────────── */
.co-next-btn, .co-back-btn { min-height: 48px; font-size: 15px; }
.co-back-btn { flex-shrink: 0; min-width: 90px; }

/* ── Success screen ──────────────────────────────────────── */
.co-success-anim { display: flex; justify-content: center; padding: 8px 0 4px; }
.co-success-circle {
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(150deg, #1fb361, #178a4a);
  color: #fff; font-size: 34px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 40px rgba(31,179,97,.38);
  animation: co-pop .45s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes co-pop {
  from { transform: scale(.2); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.co-success-title {
  text-align: center; font-family: 'Poppins', sans-serif;
  font-weight: 800; font-size: 22px; color: #0b1130;
  margin: 14px 0 4px;
}
.co-success-sub { text-align: center; color: #5c6172; font-size: 14px; margin-bottom: 18px; }
.co-success-details { margin-bottom: 18px; }
.co-success-order {
  font-size: 12.5px; color: #5c6172; text-align: center; margin-bottom: 14px;
}
.co-temp-pw {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: #065f46; margin-bottom: 12px; text-align: center;
}
.co-temp-pw code {
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  background: #fff; padding: 4px 10px; border-radius: 8px;
  display: inline-block; margin: 6px 0;
}
.co-access-links {
  background: #f0f8ff; border: 1px solid #bfdbfe; border-radius: 14px;
  padding: 14px 16px;
}
.co-al-title { font-weight: 800; font-size: 14px; color: #1e3a5f; margin-bottom: 10px; }
.co-al-list { margin: 0 0 8px; padding: 0; list-style: none; }
.co-al-list li { padding: 5px 0; border-bottom: 1px solid #dbeafe; }
.co-al-list li:last-child { border-bottom: 0; }
.co-al-list a {
  font-size: 13.5px; font-weight: 600; color: #1d4ed8;
  display: flex; align-items: center; gap: 6px;
}
.co-al-list a:hover { color: #1e40af; text-decoration: underline; }
.co-al-note { font-size: 11.5px; color: #5c6172; margin: 0; }
.co-success-actions { display: grid; gap: 8px; }

/* ── Checkout page teasers ───────────────────────────────── */
.pkg-teaser-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 12px;
}
@media (max-width: 980px) {
  .pkg-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .pkg-teaser-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .co-pkg-grid { grid-template-columns: 1fr 1fr; }
}
.pkg-teaser {
  border: 2px solid #e9e6de; border-radius: 18px; padding: 22px 18px;
  background: #fff; cursor: pointer; transition: .18s; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.pkg-teaser:hover {
  border-color: #eab030; transform: translateY(-4px); box-shadow: 0 16px 40px rgba(234,176,48,.16);
}
.pkg-teaser-best {
  border-color: #eab030; background: linear-gradient(160deg, #fffef5, #fffaf0);
  position: relative; overflow: hidden;
}
.pkg-teaser-best::before {
  content: 'BEST VALUE'; position: absolute; top: 12px; right: -28px;
  transform: rotate(40deg); background: #d64545; color: #fff;
  font-size: 9px; font-weight: 900; padding: 4px 38px; letter-spacing: .5px;
}
.pkg-t-ico  { font-size: 32px; margin-bottom: 8px; }
.pkg-t-tag  {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  background: #0b1130; color: #f7cd5a; border-radius: 6px; padding: 3px 8px; margin-bottom: 8px;
}
.pkg-t-name { font-weight: 800; font-size: 14px; color: #0b1130; margin-bottom: 4px; line-height: 1.3; }
.pkg-t-desc { font-size: 12px; color: #8890a3; margin-bottom: 10px; }
.pkg-t-price {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 24px; color: #c98f16;
}
