/* =======================================================
   VIEW PLANS MODAL
   Styled to sit quietly beside the Take a Tour modal.
======================================================= */

:root {
  --ell-plans-window: #1f1f22;
  --ell-plans-border: rgba(210, 235, 255, 0.16);
  --ell-plans-text: #f5f5f7;
  --ell-plans-muted: #b9b9c0;
  --ell-plans-blue: #93c5fd;
  --ell-plans-amber: #fbbf24;
  --ell-plans-radius: clamp(18px, 2.2vw, 30px);
  --ell-plans-toolbar-h: 58px;
  --ell-plans-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.ell-plans-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ell-plans-overlay.is-open {
  display: flex;
}

.ell-plans-window {
  width: min(90vw, calc(90dvh * 2.15278));
  height: min(90dvh, calc(90vw / 2.15278));
  max-width: 90vw;
  max-height: 90dvh;
  overflow: hidden;
  border-radius: var(--ell-plans-radius);
  border: 1px solid var(--ell-plans-border);
  background:
    radial-gradient(circle at 18% 10%, rgba(59, 130, 246, 0.16), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(251, 191, 36, 0.08), transparent 34%),
    linear-gradient(145deg, #25262b, var(--ell-plans-window));
  color: var(--ell-plans-text);
  box-shadow: var(--ell-plans-shadow);
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ell-plans-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  height: var(--ell-plans-toolbar-h);
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(32, 32, 35, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ell-plans-window-controls {
  display: flex;
  gap: 9px;
  align-items: center;
}

.ell-plans-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
  border: 0;
}

.ell-plans-dot-red {
  background: #ff5f57;
  cursor: pointer;
}

.ell-plans-dot-yellow {
  background: #ffbd2e;
}

.ell-plans-dot-green {
  background: #28c840;
}

.ell-plans-title {
  min-width: 0;
}

.ell-plans-title strong,
.ell-plans-title small {
  display: none;
}

.ell-plans-content {
  height: calc(100% - var(--ell-plans-toolbar-h));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  padding: clamp(16px, 2.2vw, 26px);
  overflow: hidden;
}

.ell-plans-lede {
  margin: 0;
  padding: clamp(10px, 1.25vw, 15px) clamp(16px, 2vw, 24px);
  border-radius: clamp(16px, 1.8vw, 24px);
  border: 1px solid rgba(147, 197, 253, 0.20);
  background: rgba(9, 15, 28, 0.34);
  color: #dbeafe;
  font-size: clamp(14px, 1.22vw, 19px);
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.ell-plans-list {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(10px, 1.4vw, 16px);
  transition: grid-template-columns 0.45s ease;
}

.ell-plans-list.has-open-plan[data-open-plan="monthly"] {
  grid-template-columns: 1.95fr 0.62fr 0.62fr;
}

.ell-plans-list.has-open-plan[data-open-plan="quarterly"] {
  grid-template-columns: 0.62fr 1.95fr 0.62fr;
}

.ell-plans-list.has-open-plan[data-open-plan="school"] {
  grid-template-columns: 0.62fr 0.62fr 1.95fr;
}

.ell-plan-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1vw, 14px);
  padding: clamp(14px, 1.7vw, 22px);
  border-radius: clamp(16px, 1.9vw, 25px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: background 0.28s ease, border-color 0.28s ease, transform 0.28s ease;
}

.ell-plan-card:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.15);
}

.ell-plan-card.is-expanded {
  background: rgba(15, 23, 42, 0.70);
  border-color: rgba(147, 197, 253, 0.35);
}

.ell-plan-card:not(.is-expanded) .ell-plan-expanded {
  display: none;
}

.ell-plan-card:not(.is-expanded) .ell-plan-summary {
  display: block;
}

.ell-plans-list.has-open-plan .ell-plan-card:not(.is-expanded) {
  padding-inline: clamp(10px, 1.1vw, 14px);
}

.ell-plans-list.has-open-plan .ell-plan-card:not(.is-expanded) .ell-plan-kicker,
.ell-plans-list.has-open-plan .ell-plan-card:not(.is-expanded) .ell-plan-summary,
.ell-plans-list.has-open-plan .ell-plan-card:not(.is-expanded) .ell-plan-price span {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.ell-plans-list.has-open-plan .ell-plan-card:not(.is-expanded) .ell-plan-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.1;
}

.ell-plan-main {
  min-width: 0;
}

.ell-plan-kicker {
  margin: 0 0 4px;
  color: var(--ell-plans-blue);
  font-size: clamp(10px, 0.82vw, 12px);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ell-plan-name {
  margin: 0;
  font-size: clamp(22px, 2.15vw, 34px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.ell-plan-summary {
  margin: clamp(6px, 0.8vw, 10px) 0 0;
  color: var(--ell-plans-muted);
  font-size: clamp(12px, 1.02vw, 15px);
  font-weight: 400;
  line-height: 1.5;
}

.ell-plan-price {
  align-self: start;
}

.ell-plan-price strong {
  display: block;
  color: #ffffff;
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.ell-plan-price span {
  display: block;
  margin-top: 5px;
  color: var(--ell-plans-muted);
  font-size: clamp(11px, 0.95vw, 14px);
  font-weight: 400;
}

.ell-plan-expanded {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(10px, 1.25vw, 16px);
  overflow: hidden;
}

.ell-payment-unit,
.ell-school-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1vw, 12px);
}

.ell-payment-unit {
  color: #d1d5db;
  font-size: clamp(12px, 1.02vw, 15px);
  line-height: 1.5;
}

.ell-payment-unit strong {
  color: #ffffff;
  font-weight: 600;
}

.ell-plan-action,
@media (max-width: 860px), (max-height: 560px) {
  .ell-plans-window {
    width: 94vw;
    height: 92dvh;
  }

  .ell-plans-content {
    padding: 12px;
    gap: 10px;
    overflow: hidden;
  }

  .ell-plans-list,
  .ell-plans-list.has-open-plan[data-open-plan] {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow-y: auto;
  }

  .ell-plans-list.has-open-plan .ell-plan-card:not(.is-expanded) .ell-plan-name {
    writing-mode: horizontal-tb;
  }

  .ell-plan-expanded {
    grid-template-rows: auto auto;
  }

  .ell-school-form {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 900px) {
  .ell-plans-lede {
    white-space: normal;
  }
}

/* School inquiry card: intentionally quiet and form-first. */
.ell-school-card {
  grid-template-rows: minmax(0, 1fr) auto;
}

.ell-school-card .ell-plan-expanded {
  min-height: 0;
  display: block;
}

.ell-school-card:not(.is-expanded) .ell-plan-expanded {
  display: none;
}

.ell-school-card.is-expanded .ell-school-open {
  display: none;
}

.ell-school-form {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(9px, 1vw, 13px);
}

.ell-school-form input,
.ell-school-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: clamp(13px, 1.35vw, 18px);
  background: rgba(229, 231, 235, 0.92);
  color: #1f2937;
  padding: clamp(10px, 1.1vw, 14px) clamp(12px, 1.35vw, 16px);
  font: inherit;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.ell-school-form input::placeholder,
.ell-school-form textarea::placeholder {
  color: #4b5563;
  opacity: 0.86;
}

.ell-school-form input:focus,
.ell-school-form textarea:focus {
  border-color: rgba(147, 197, 253, 0.95);
  background: rgba(243, 244, 246, 0.98);
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.ell-school-form textarea {
  grid-column: 1 / -1;
  min-height: 0;
  height: 100%;
  resize: none;
}

.ell-school-submit {
  justify-self: end;
  min-height: clamp(34px, 3.4vw, 44px);
  padding: 0 clamp(16px, 1.8vw, 24px);
  border-radius: 999px;
  font-size: clamp(12px, 0.95vw, 14px);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.20);
}

@media (max-width: 860px), (max-height: 560px) {
  .ell-school-form {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(110px, 1fr) auto;
  }
}

/* School inquiry thank-you / status modal */
.ell-school-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ell-school-notice-overlay.is-open {
  display: flex;
}

.ell-school-notice {
  position: relative;
  width: min(520px, 92vw);
  padding: clamp(24px, 4vw, 38px);
  border-radius: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(210, 235, 255, 0.18);
  background:
    radial-gradient(circle at 20% 0%, rgba(147, 197, 253, 0.20), transparent 40%),
    linear-gradient(145deg, #25262b, #1f1f22);
  color: #f5f5f7;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ell-school-notice-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.38);
  font-size: 30px;
  font-weight: 700;
}

.ell-school-notice-overlay[data-tone="error"] .ell-school-notice-icon {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.34);
}

.ell-school-notice-overlay[data-tone="error"] .ell-school-notice-icon::before {
  content: "!";
}

.ell-school-notice-overlay[data-tone="error"] .ell-school-notice-icon {
  font-size: 0;
}

.ell-school-notice-overlay[data-tone="error"] .ell-school-notice-icon::before {
  font-size: 30px;
}

.ell-school-notice h2 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ell-school-notice p {
  margin: 10px auto 0;
  max-width: 38ch;
  color: #d1d5db;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.5;
}

.ell-school-notice-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  font-size: 22px;
  cursor: pointer;
}

.ell-school-notice-ok {
  margin-top: 22px;
  min-width: 110px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.96), rgba(217, 119, 6, 0.96));
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ell-school-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

