/**
 * Site Mechanic - Pricing Modal Styles
 * Swiss Minimal Design - Compact v4
 *
 * Strict spacing scale: 6 / 10 / 14 / 18 / 24
 * Typography: Inter, tight vertical rhythm
 */

/* ============================================
   Design Tokens (Modal-scoped)
   ============================================ */

.sm-modal__overlay {
  --sm-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Colors - Light theme default */
  --sm-border-light: rgba(0, 0, 0, 0.08);
  --sm-border-medium: rgba(0, 0, 0, 0.12);
  --sm-border-strong: rgba(0, 0, 0, 0.18);
  --sm-text-primary: #111111;
  --sm-text-secondary: #52525b;
  --sm-text-muted: #8b8b94;
  --sm-bg-overlay: rgba(0, 0, 0, 0.5);
  --sm-bg-panel: #ffffff;
  --sm-bg-card: #fafafa;
  --sm-bg-card-hover: #f5f5f5;
  --sm-bg-featured: rgba(0, 0, 0, 0.02);
  --sm-accent: #111111;
  --sm-accent-hover: #333333;
  --sm-success: #16a34a;
  --sm-success-bg: rgba(22, 163, 74, 0.08);

  /* Radius */
  --sm-radius-sm: 6px;
  --sm-radius-md: 12px;
  --sm-radius-lg: 16px;

  /* Shadows */
  --sm-shadow-panel: 0 24px 48px -12px rgba(0, 0, 0, 0.18);
}

/* ============================================
   Box Sizing Reset
   ============================================ */

.sm-modal__overlay,
.sm-modal__overlay *,
.sm-modal__overlay *::before,
.sm-modal__overlay *::after {
  box-sizing: border-box;
}

/* ============================================
   Body Lock
   ============================================ */

html.sm-modal-open,
body.sm-modal-open {
  overflow: hidden !important;
  height: 100%;
}

/* ============================================
   Overlay
   ============================================ */

.sm-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--sm-bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  font-family: var(--sm-font);
}

.sm-modal__overlay--open {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   Panel - Compact Shell
   ============================================ */

.sm-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1060px, calc(100vw - 40px));
  max-height: 86vh;
  background: var(--sm-bg-panel);
  border: 1px solid var(--sm-border-light);
  border-radius: var(--sm-radius-lg);
  box-shadow: var(--sm-shadow-panel);
  overflow: hidden;
  transform: scale(0.97) translateY(8px);
  transition: transform 0.2s ease;
}

.sm-modal__overlay--open .sm-modal__panel {
  transform: scale(1) translateY(0);
}

/* ============================================
   Header - Tight & Aligned
   ============================================ */

.sm-modal__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--sm-border-light);
  flex-shrink: 0;
}

.sm-modal__header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sm-modal__logo {
  height: 44px;
  width: auto;
}

.sm-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--sm-text-primary);
  line-height: 1.2;
  flex: 1;
  text-align: center;
}

/* Close Button - 36x36 */
.sm-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--sm-border-medium);
  border-radius: var(--sm-radius-sm);
  color: var(--sm-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sm-modal__close:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--sm-border-strong);
  color: var(--sm-text-primary);
}

.sm-modal__close:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(0, 0, 0, 0.2);
}

.sm-modal__close:focus:not(:focus-visible) {
  box-shadow: none;
}

.sm-modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(0, 0, 0, 0.2);
}

.sm-modal__close svg {
  display: block;
  width: 14px;
  height: 14px;
}

/* ============================================
   Font Size Toggle - Accessibility
   ============================================ */

.sm-modal__font-size {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  margin-right: 10px;
  padding: 2px;
  background: var(--sm-bg-card);
  border: 1px solid var(--sm-border-light);
  border-radius: var(--sm-radius-sm);
}

.sm-modal__font-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--sm-text-muted);
  font-family: var(--sm-font);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sm-modal__font-btn:hover {
  background: var(--sm-bg-card-hover);
  color: var(--sm-text-secondary);
}

.sm-modal__font-btn--active {
  background: var(--sm-accent);
  color: var(--sm-bg-panel);
}

.sm-modal__font-btn--active:hover {
  background: var(--sm-accent-hover);
  color: var(--sm-bg-panel);
}

.sm-modal__font-btn--large {
  font-size: 14px;
}

.sm-modal__font-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(0, 0, 0, 0.2);
}

.sm-modal__font-btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.sm-modal__font-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Font Size Modifiers
   ============================================ */

.sm-modal__panel--font-small {
  font-size: 13px;
}

.sm-modal__panel--font-small .sm-modal__title {
  font-size: 13px;
}

.sm-modal__panel--font-small .sm-plan-card__name {
  font-size: 12px;
}

.sm-modal__panel--font-small .sm-plan-card__amount {
  font-size: 26px;
}

.sm-modal__panel--font-small .sm-plan-card__period,
.sm-modal__panel--font-small .sm-plan-card__unit {
  font-size: 10px;
}

.sm-modal__panel--font-small .sm-plan-card__benefit {
  font-size: 11px;
}

.sm-modal__panel--font-small .sm-plan-card__btn {
  font-size: 12px;
  height: 34px;
}

.sm-modal__panel--font-large {
  font-size: 17px;
}

.sm-modal__panel--font-large .sm-modal__title {
  font-size: 18px;
}

.sm-modal__panel--font-large .sm-plan-card__name {
  font-size: 15px;
}

.sm-modal__panel--font-large .sm-plan-card__amount {
  font-size: 36px;
}

.sm-modal__panel--font-large .sm-plan-card__period,
.sm-modal__panel--font-large .sm-plan-card__unit {
  font-size: 13px;
}

.sm-modal__panel--font-large .sm-plan-card__benefit {
  font-size: 14px;
}

.sm-modal__panel--font-large .sm-plan-card__btn {
  font-size: 14px;
  height: 42px;
}

/* ============================================
   Body - Scrollable Content
   ============================================ */

.sm-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 18px;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   Pricing Grid - 4 Column Desktop
   ============================================ */

.sm-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: stretch; /* Cards stretch to same height so buttons align */
}

/* 3 cards centering */
.sm-pricing-grid:has(.sm-plan-card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 780px;
  margin: 0 auto;
}

/* ============================================
   Plan Card - COMPACT Structure
   ============================================ */

.sm-plan-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--sm-bg-card);
  border: 1px solid var(--sm-border-light);
  border-radius: var(--sm-radius-md);
  transition: border-color 0.15s ease;
}

.sm-plan-card:hover {
  border-color: var(--sm-border-medium);
}

/* Featured Card (Yearly) - Subtle recommendation */
.sm-plan-card--featured {
  border-color: var(--sm-border-strong);
  background: var(--sm-bg-featured);
}

.sm-plan-card--featured:hover {
  border-color: var(--sm-accent);
}

/* Current/Purchased Card */
.sm-plan-card--current,
.sm-plan-card--purchased {
  border-color: var(--sm-success);
  background: var(--sm-success-bg);
}

/* ============================================
   Card Header - Name + Badge Row
   ============================================ */

.sm-plan-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  min-height: 2.8rem; /* Ensures prices align across cards when titles wrap */
}

.sm-plan-card__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sm-text-primary);
  line-height: 1.2;
  padding-bottom: 0;
}

/* Badge */
.sm-plan-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 100px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.sm-plan-card__badge--save {
  background: var(--sm-success);
  color: #fff;
}

.sm-plan-card__badge--current,
.sm-plan-card__badge--purchased {
  background: var(--sm-success);
  color: #fff;
}

/* ============================================
   Card Price - Tight Unit
   ============================================ */

.sm-plan-card__price {
  margin-bottom: 4px;
}

.sm-plan-card__amount {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--sm-text-primary);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.sm-plan-card__period {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sm-text-muted);
  line-height: 1.2;
}

/* Effective rate subline for yearly */
.sm-plan-card__effective {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--sm-text-secondary);
  line-height: 1.2;
}

/* ============================================
   Card Description - Mini Line
   ============================================ */

.sm-plan-card__desc {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: var(--sm-text-muted);
  line-height: 1.3;
}

/* ============================================
   Card Benefits - Compact List
   ============================================ */

.sm-plan-card__benefits {
  list-style: none;
  margin: 0 0 10px 0;
  padding: 0;
}

.sm-plan-card__benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--sm-text-secondary);
  line-height: 1.35;
}

.sm-plan-card__benefit + .sm-plan-card__benefit {
  margin-top: 4px;
}

.sm-plan-card__benefit::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  background: var(--sm-text-muted);
  border-radius: 50%;
  opacity: 0.6;
}

/* ============================================
   Card Footer - CTA Pinned Bottom
   ============================================ */

.sm-plan-card__footer {
  margin-top: auto;
}

/* ============================================
   Buttons - Full Width, 44px Height
   ============================================ */

.sm-plan-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  padding: 0 14px;
  font-family: var(--sm-font);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: var(--sm-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.sm-plan-card__btn:active:not(:disabled) {
  transform: scale(0.98);
}

.sm-plan-card__btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(0, 0, 0, 0.2);
}

.sm-plan-card__btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.sm-plan-card__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(0, 0, 0, 0.2);
}

/* Primary Button */
.sm-plan-card__btn--primary {
  background: var(--sm-accent);
  border: 1px solid var(--sm-accent);
  color: #fff;
}

.sm-plan-card__btn--primary:hover:not(:disabled) {
  background: var(--sm-accent-hover);
  border-color: var(--sm-accent-hover);
}

/* Featured Button (Yearly) */
.sm-plan-card__btn--featured {
  background: var(--sm-accent);
  border: 1px solid var(--sm-accent);
  color: #fff;
}

.sm-plan-card__btn--featured:hover:not(:disabled) {
  background: var(--sm-accent-hover);
  border-color: var(--sm-accent-hover);
}

/* Secondary Button */
.sm-plan-card__btn--secondary {
  background: transparent;
  border: 1px solid var(--sm-border-medium);
  color: var(--sm-text-primary);
}

.sm-plan-card__btn--secondary:hover:not(:disabled) {
  background: var(--sm-bg-card-hover);
  border-color: var(--sm-border-strong);
}

/* Current Button */
.sm-plan-card__btn--current {
  background: var(--sm-success-bg);
  border: 1px solid var(--sm-success);
  color: var(--sm-success);
}

.sm-plan-card__btn--current:hover:not(:disabled) {
  background: rgba(22, 163, 74, 0.12);
}

/* Purchased Button */
.sm-plan-card__btn--purchased {
  background: var(--sm-success-bg);
  border: 1px solid var(--sm-success);
  color: var(--sm-success);
  cursor: default;
}

/* Disabled Button */
.sm-plan-card__btn--disabled,
.sm-plan-card__btn:disabled {
  background: transparent;
  border: 1px solid var(--sm-border-light);
  color: var(--sm-text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================
   Footer - Powered by Stripe
   ============================================ */

.sm-modal__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-top: 1px solid var(--sm-border-light);
  background: var(--sm-bg-panel);
  flex-shrink: 0;
}

.sm-modal__footer-text {
  font-size: 11px;
  font-weight: 400;
  color: var(--sm-text-muted);
}

.sm-modal__footer-stripe {
  height: 36px;
  width: auto;
  color: var(--sm-text-muted);
  opacity: 0.8;
}

.sm-modal__footer-sep {
  color: var(--sm-text-muted);
  opacity: 0.5;
}

.sm-modal__footer-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sm-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--sm-text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sm-modal__footer-link:hover {
  color: var(--sm-text-primary);
}

.sm-modal__footer-link:focus {
  outline: 2px solid var(--sm-accent);
  outline-offset: 2px;
}

/* ============================================
   Error State
   ============================================ */

.sm-pricing-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--sm-radius-sm);
}

.sm-pricing-error__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #dc2626;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.sm-pricing-error__msg {
  flex: 1;
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.4;
}

.sm-pricing-error__retry {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--sm-radius-sm);
  color: #dc2626;
  font-family: var(--sm-font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sm-pricing-error__retry:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* ============================================
   Login Prompt
   ============================================ */

.sm-pricing-login {
  text-align: center;
  padding: 24px 18px;
}

.sm-pricing-login__text {
  margin: 0 0 14px 0;
  font-size: 14px;
  color: var(--sm-text-secondary);
  line-height: 1.5;
}

.sm-pricing-login__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  font-family: var(--sm-font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--sm-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sm-btn--primary {
  background: var(--sm-accent);
  border: 1px solid var(--sm-accent);
  color: #fff;
}

.sm-btn--primary:hover {
  background: var(--sm-accent-hover);
  border-color: var(--sm-accent-hover);
}

.sm-btn--outline {
  background: transparent;
  border: 1px solid var(--sm-border-medium);
  color: var(--sm-text-primary);
}

.sm-btn--outline:hover {
  background: var(--sm-bg-card-hover);
  border-color: var(--sm-border-strong);
}

/* ============================================
   Responsive - Tablet (max 800px)
   ============================================ */

@media (max-width: 800px) {
  .sm-modal__overlay {
    padding: 14px;
  }

  .sm-modal__panel {
    width: min(100%, calc(100vw - 28px));
  }

  .sm-modal__body {
    padding: 14px;
  }

  .sm-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .sm-pricing-grid:has(.sm-plan-card:nth-child(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .sm-plan-card {
    padding: 14px;
  }

  .sm-plan-card__amount {
    font-size: 28px;
  }
}

/* ============================================
   Responsive - Mobile (max 540px)
   ============================================ */

@media (max-width: 540px) {
  .sm-plan-card__header {
    min-height: auto; /* Single-column layout: no alignment needed */
  }

  .sm-modal__overlay {
    padding: 0;
    align-items: flex-end;
  }

  .sm-modal__panel {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--sm-radius-lg) var(--sm-radius-lg) 0 0;
  }

  .sm-modal__header {
    padding: 12px 14px;
  }

  .sm-modal__logo {
    height: 20px;
  }

  .sm-modal__title {
    font-size: 14px;
  }

  .sm-modal__close {
    width: 34px;
    height: 34px;
  }

  .sm-modal__font-size {
    margin-right: 8px;
  }

  .sm-modal__font-btn {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .sm-modal__font-btn--large {
    font-size: 12px;
  }

  .sm-modal__body {
    padding: 14px;
  }

  .sm-pricing-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sm-pricing-grid:has(.sm-plan-card:nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }

  .sm-plan-card {
    padding: 14px;
  }

  .sm-plan-card__amount {
    font-size: 26px;
  }

  .sm-plan-card__btn {
    height: 40px;
  }

  .sm-modal__footer {
    padding: 10px 14px;
  }
}

/* ============================================
   Responsive - Extra Small (max 380px)
   ============================================ */

@media (max-width: 380px) {
  .sm-modal__title {
    display: none;
  }

  .sm-modal__font-size {
    margin-left: auto;
  }
}

/* ============================================
   Dark Theme
   ============================================ */

@media (prefers-color-scheme: dark) {
  .sm-modal__overlay:not(.white-theme *) {
    --sm-border-light: rgba(255, 255, 255, 0.08);
    --sm-border-medium: rgba(255, 255, 255, 0.12);
    --sm-border-strong: rgba(255, 255, 255, 0.18);
    --sm-text-primary: #fafafa;
    --sm-text-secondary: #a1a1aa;
    --sm-text-muted: #8b8b94;
    --sm-bg-overlay: rgba(0, 0, 0, 0.8);
    --sm-bg-panel: #18181b;
    --sm-bg-card: #1f1f23;
    --sm-bg-card-hover: #27272a;
    --sm-bg-featured: rgba(255, 255, 255, 0.02);
    --sm-accent: #fafafa;
    --sm-accent-hover: #e4e4e7;
    --sm-success: #22c55e;
    --sm-success-bg: rgba(34, 197, 94, 0.1);
  }

  .sm-modal__overlay:not(.white-theme *) .sm-plan-card__btn--primary,
  .sm-modal__overlay:not(.white-theme *) .sm-plan-card__btn--featured {
    color: #18181b;
  }

  .sm-modal__overlay:not(.white-theme *) .sm-btn--primary {
    color: #18181b;
  }

  .sm-modal__overlay:not(.white-theme *) .sm-plan-card__badge--save {
    background: #22c55e;
    color: #fff;
  }

  .sm-modal__overlay:not(.white-theme *) .sm-modal__close:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

/* Explicit dark theme class */
body:not(.white-theme) .sm-modal__overlay {
  --sm-border-light: rgba(255, 255, 255, 0.08);
  --sm-border-medium: rgba(255, 255, 255, 0.12);
  --sm-border-strong: rgba(255, 255, 255, 0.18);
  --sm-text-primary: #fafafa;
  --sm-text-secondary: #a1a1aa;
  --sm-text-muted: #71717a;
  --sm-bg-overlay: rgba(0, 0, 0, 0.8);
  --sm-bg-panel: #18181b;
  --sm-bg-card: #1f1f23;
  --sm-bg-card-hover: #27272a;
  --sm-bg-featured: rgba(255, 255, 255, 0.02);
  --sm-accent: #fafafa;
  --sm-accent-hover: #e4e4e7;
  --sm-success: #22c55e;
  --sm-success-bg: rgba(34, 197, 94, 0.1);
}

body:not(.white-theme) .sm-modal__overlay .sm-plan-card__btn--primary,
body:not(.white-theme) .sm-modal__overlay .sm-plan-card__btn--featured {
  color: #18181b;
}

body:not(.white-theme) .sm-modal__overlay .sm-btn--primary {
  color: #18181b;
}

body:not(.white-theme) .sm-modal__overlay .sm-plan-card__badge--save {
  background: #22c55e;
  color: #fff;
}

body:not(.white-theme) .sm-modal__overlay .sm-modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
}

body:not(.white-theme) .sm-modal__overlay .sm-modal__font-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

body:not(.white-theme) .sm-modal__overlay .sm-modal__font-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--sm-bg-panel), 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* ============================================
   Light Theme Override
   ============================================ */

.white-theme .sm-modal__overlay,
body.white-theme .sm-modal__overlay {
  --sm-border-light: rgba(0, 0, 0, 0.08);
  --sm-border-medium: rgba(0, 0, 0, 0.12);
  --sm-border-strong: rgba(0, 0, 0, 0.18);
  --sm-text-primary: #111111;
  --sm-text-secondary: #52525b;
  --sm-text-muted: #71717a;
  --sm-bg-overlay: rgba(0, 0, 0, 0.5);
  --sm-bg-panel: #ffffff;
  --sm-bg-card: #fafafa;
  --sm-bg-card-hover: #f5f5f5;
  --sm-bg-featured: rgba(0, 0, 0, 0.02);
  --sm-accent: #111111;
  --sm-accent-hover: #333333;
  --sm-success: #16a34a;
  --sm-success-bg: rgba(22, 163, 74, 0.08);
}

.white-theme .sm-modal__overlay .sm-plan-card__btn--primary,
.white-theme .sm-modal__overlay .sm-plan-card__btn--featured,
body.white-theme .sm-modal__overlay .sm-plan-card__btn--primary,
body.white-theme .sm-modal__overlay .sm-plan-card__btn--featured {
  color: #fff;
}

.white-theme .sm-modal__overlay .sm-btn--primary,
body.white-theme .sm-modal__overlay .sm-btn--primary {
  color: #fff;
}

.white-theme .sm-modal__overlay .sm-plan-card__badge--save,
body.white-theme .sm-modal__overlay .sm-plan-card__badge--save {
  background: #16a34a;
  color: #fff;
}


/* ============================================
   Reduce Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .sm-modal__overlay,
  .sm-modal__panel,
  .sm-plan-card,
  .sm-plan-card__btn,
  .sm-modal__close {
    transition: none;
  }
}
