/* ── CrewTime Pricing Page ─────────────────────────────────────────── */

.ct-pricing-layout {
  max-width: 960px;
  margin: 0 auto;
}

/* ── Billing toggle ───────────────────────────────────────────────── */

.ct-billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 40px;
  padding: 4px;
  background: var(--ct-surface-muted, #f3f4f6);
  border: 1.5px solid var(--ct-border, #e5e7eb);
  border-radius: var(--ct-radius-pill, 999px);
  width: fit-content;
}

.ct-billing-option {
  padding: 9px 24px;
  border: none;
  border-radius: var(--ct-radius-pill, 999px);
  background: transparent;
  color: var(--ct-text-muted, #6b7280);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ct-billing-option:hover {
  color: var(--ct-text, #0b1220);
}

.ct-billing-option.is-active {
  background: var(--ct-surface, #fff);
  color: var(--ct-text, #0b1220);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ct-billing-save {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--ct-radius-pill, 999px);
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-600, #16a34a);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Pricing grid ─────────────────────────────────────────────────── */

.ct-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .ct-pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ── Pricing card ─────────────────────────────────────────────────── */

.ct-pricing-card {
  position: relative;
  background: var(--ct-surface, #fff);
  border: 1.5px solid var(--ct-border, #e5e7eb);
  border-radius: var(--ct-radius-card, 20px);
  padding: 32px 26px 26px;
  box-shadow: var(--ct-shadow-sm, 0 4px 14px rgba(0, 0, 0, 0.05));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ct-pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ct-shadow-md, 0 12px 30px rgba(0, 0, 0, 0.08));
}

/* Inner wrapper — sits above pseudo-element circles */
.ct-pricing-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Popular card — blue gradient treatment ──────────────────────── */

.ct-pricing-card.is-popular {
  background: linear-gradient(150deg, #1E3A8A 0%, #1D4ED8 55%, #2563EB 100%);
  border: 1px solid rgba(96, 165, 250, 0.25);
  box-shadow: 0 12px 40px rgba(30, 58, 138, 0.25);
  color: #fff;
  transform: translateY(-6px);
  overflow: hidden;
}

.ct-pricing-card.is-popular:hover {
  transform: translateY(-9px);
  box-shadow: 0 16px 48px rgba(30, 58, 138, 0.32);
}

/* Decorative circles */
.ct-pricing-card.is-popular::before,
.ct-pricing-card.is-popular::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.ct-pricing-card.is-popular::before {
  width: 14rem;
  height: 14rem;
  bottom: -3rem;
  right: -3rem;
}
.ct-pricing-card.is-popular::after {
  width: 18rem;
  height: 18rem;
  bottom: -5rem;
  right: -5rem;
}

/* Popular card — text colour hierarchy */
.is-popular .ct-pricing-currency,
.is-popular .ct-pricing-price,
.is-popular .ct-pricing-tagline {
  color: #fff;
}

.is-popular .ct-pricing-interval,
.is-popular .ct-pricing-best-for-label {
  color: rgba(255, 255, 255, 0.75);
}

.is-popular .ct-pricing-feature span,
.is-popular .ct-pricing-best-for {
  color: rgba(255, 255, 255, 0.88);
}

.is-popular .ct-pricing-group-label {
  color: rgba(255, 255, 255, 0.55);
}

.is-popular .ct-pricing-includes {
  color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.is-popular .ct-pricing-check {
  color: rgba(255, 255, 255, 0.9);
}

.is-popular .ct-pricing-effective {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Plan name & descriptor ───────────────────────────────────────── */

.ct-pricing-header {
  margin-bottom: 14px;
}

.ct-pricing-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--ct-text, #0b1220);
  line-height: 1.2;
  margin-bottom: 2px;
}

.is-popular .ct-pricing-name { color: #fff; }

.ct-pricing-descriptor {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-text-muted, #6b7280);
}

.is-popular .ct-pricing-descriptor { color: rgba(255, 255, 255, 0.5); }

.ct-pricing-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: var(--ct-radius-pill, 999px);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

/* ── Operator card — premium top tier ────────────────────────────── */

/* ── Operator card — premium top tier with dark sophisticated treatment ── */

.ct-pricing-card.is-operator {
  background: linear-gradient(150deg, #0F172A 0%, #1E293B 60%, #334155 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.3);
  color: #fff;
  overflow: hidden;
}

.ct-pricing-card.is-operator:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.38);
}

/* Decorative circles */
.ct-pricing-card.is-operator::before,
.ct-pricing-card.is-operator::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.06);
  pointer-events: none;
}
.ct-pricing-card.is-operator::before {
  width: 12rem; height: 12rem;
  top: -3rem; right: -3rem;
}
.ct-pricing-card.is-operator::after {
  width: 16rem; height: 16rem;
  bottom: -5rem; left: -4rem;
}

.is-operator .ct-pricing-name {
  color: #fff;
}

.is-operator .ct-pricing-descriptor {
  color: rgba(96, 165, 250, 0.9);
}

.is-operator .ct-pricing-currency,
.is-operator .ct-pricing-price,
.is-operator .ct-pricing-tagline {
  color: #fff;
}

.is-operator .ct-pricing-interval,
.is-operator .ct-pricing-best-for-label {
  color: rgba(255, 255, 255, 0.6);
}

.is-operator .ct-pricing-feature span,
.is-operator .ct-pricing-best-for {
  color: rgba(255, 255, 255, 0.85);
}

.is-operator .ct-pricing-group-label {
  color: rgba(255, 255, 255, 0.45);
}

.is-operator .ct-pricing-includes {
  color: rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.is-operator .ct-pricing-check {
  color: rgba(96, 165, 250, 0.9);
}

.is-operator .ct-pricing-effective {
  color: rgba(255, 255, 255, 0.6);
}

.is-operator .ct-pricing-fine-print {
  color: rgba(255, 255, 255, 0.5);
}

/* ── Price display ────────────────────────────────────────────────── */

.ct-pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 4px;
}

.ct-pricing-currency {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ct-text, #0b1220);
  line-height: 1;
}

.ct-pricing-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--ct-text, #0b1220);
  line-height: 1;
  letter-spacing: -0.03em;
}

.ct-pricing-interval {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ct-text-muted, #6b7280);
  margin-left: 2px;
}

.ct-pricing-effective {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--success-600, #16a34a);
  margin-bottom: 4px;
}

/* ── Tagline ──────────────────────────────────────────────────────── */

.ct-pricing-tagline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  color: var(--ct-text, #0b1220);
  font-weight: 600;
  margin: 6px 0 4px;
  line-height: 1.5;
}

/* ── Best for ─────────────────────────────────────────────────────── */

.ct-pricing-best-for {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  color: var(--ct-text-muted, #6b7280);
  margin: 0 0 18px;
  line-height: 1.55;
}

.ct-pricing-best-for-label {
  font-weight: 700;
  color: var(--ct-text-secondary, #4b5563);
}

/* ── Feature list ─────────────────────────────────────────────────── */

.ct-pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.ct-pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: var(--ct-text, #0b1220);
  line-height: 1.45;
}

/* ── Includes previous line ───────────────────────────────────────── */

.ct-pricing-includes {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ct-text-muted, #6b7280);
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--ct-border, #e5e7eb);
  list-style: none;
}

/* ── Feature group label ─────────────────────────────────────────── */

.ct-pricing-group-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-text-muted, #6b7280);
  margin-top: 8px;
  margin-bottom: -2px;
  list-style: none;
}

.ct-pricing-group-label:first-child {
  margin-top: 0;
}

.ct-pricing-includes + .ct-pricing-group-label {
  margin-top: 4px;
}

.ct-pricing-check {
  flex-shrink: 0;
  color: var(--success-600, #16a34a);
  margin-top: 1px;
}

/* ── CTA area — pinned to bottom ─────────────────────────────────── */

.ct-pricing-cta-area {
  margin-top: auto;
  padding-top: 20px;
}

.ct-pricing-cta {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--ct-radius-control, 12px);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  text-decoration: none;
}

.ct-pricing-cta.ct-btn-primary {
  background: var(--brand-600, #3B82F6);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.2);
}

.ct-pricing-cta.ct-btn-primary:hover {
  background: var(--brand-700, #2563EB);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.28);
}

/* Popular card CTA — inverted white */
.is-popular .ct-pricing-cta.ct-btn-primary {
  background: #fff;
  color: #1D4ED8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.is-popular .ct-pricing-cta.ct-btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #1E3A8A;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Operator CTA — white on dark card, premium feel */
.ct-pricing-cta.ct-btn-operator {
  background: #fff;
  color: #0F172A;
  border: none;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.ct-pricing-cta.ct-btn-operator:hover {
  background: #F1F5F9;
  color: #0F172A;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ct-pricing-cta.ct-btn-secondary {
  background: var(--ct-surface, #fff);
  color: var(--ct-text, #0b1220);
  border: 1.5px solid var(--ct-border, #e5e7eb);
}

.ct-pricing-cta.ct-btn-secondary:hover {
  background: var(--ct-surface-muted, #f3f4f6);
  border-color: var(--ct-border-strong, #d1d5db);
  transform: translateY(-1px);
}

/* ── Fine print ──────────────────────────────────────────────────── */

.ct-pricing-fine-print {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--ct-text-muted, #6b7280);
  text-align: center;
  margin-top: 8px;
}

/* ── Toast ────────────────────────────────────────────────────────── */

.ct-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 22px;
  border-radius: var(--ct-radius-control, 12px);
  background: var(--ct-text, #0b1220);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  box-shadow: var(--ct-shadow-md);
}

.ct-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ct-toast.is-error {
  background: var(--danger-600, #dc2626);
}

/* ── Dark mode — pricing ─────────────────────────────────────────── */

body.ct-app.dark-mode .ct-pricing-card {
  background: var(--ct-surface);
  border-color: var(--ct-border);
  box-shadow: var(--shadow-sm);
}

/* Popular card keeps gradient in dark mode */
body.ct-app.dark-mode .ct-pricing-card.is-popular {
  background: linear-gradient(150deg, #1E3A8A 0%, #1D4ED8 55%, #2563EB 100%);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 12px 40px rgba(30, 58, 138, 0.35);
}

/* Operator dark card — navy gradient */
body.ct-app.dark-mode .ct-pricing-card.is-operator {
  background: linear-gradient(150deg, #0F172A 0%, #1E293B 60%, #243244 100%);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

body.ct-app.dark-mode .ct-pricing-descriptor {
  color: var(--ct-text-muted);
}

body.ct-app.dark-mode .is-operator .ct-pricing-name {
  color: #60A5FA;
}

body.ct-app.dark-mode .is-operator .ct-pricing-descriptor {
  color: #93C5FD;
}

body.ct-app.dark-mode .ct-pricing-fine-print {
  color: var(--ct-text-muted);
}

body.ct-app.dark-mode .ct-pricing-popular-badge {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.ct-app.dark-mode .ct-billing-toggle {
  background: var(--ct-surface);
  border-color: var(--ct-border);
}

body.ct-app.dark-mode .ct-billing-option.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ct-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.ct-app.dark-mode .ct-billing-save {
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
}

body.ct-app.dark-mode .ct-pricing-cta.ct-btn-secondary {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #93B4F5;
}

body.ct-app.dark-mode .ct-pricing-cta.ct-btn-secondary:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.3);
  color: #BFDBFE;
}

body.ct-app.dark-mode .ct-pricing-cta.ct-btn-operator {
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.25);
}

body.ct-app.dark-mode .ct-pricing-includes {
  border-color: var(--ct-border);
}

body.ct-app.dark-mode .ct-pricing-best-for-label {
  color: var(--ct-text-muted);
}

body.ct-app.dark-mode .ct-toast {
  background: var(--surface-elevated, #243244);
  color: var(--ink, #E8ECF4);
  border: 1px solid var(--border);
}

body.ct-app.dark-mode .ct-toast.is-error {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border-color: rgba(239, 68, 68, 0.25);
}
