/* ==========================================================================
   ZYLAX PASS — LIQUID GLASS SAAS DESIGN SYSTEM (WCAG AAA HARDENED)
   Storefront • Auth • Subscription Gate • Studio • Searchable Comboboxes
   ========================================================================== */

:root,
html,
body {
  color-scheme: dark;
}

html.theme-light,
body.theme-light {
  color-scheme: light !important;
}

/* Prevent large form sections from shrinking on mouse click */
section.liquid-glass:active,
aside.liquid-glass:active,
main.liquid-glass:active {
  transform: none !important;
}

.saas-input {
  width: 100%;
  background-color: #111622;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 11px 14px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.saas-input::placeholder {
  color: #94A3B8;
  opacity: 1;
}

.saas-input:focus {
  background-color: #161D2C;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Native <select>, <option>, and <optgroup> Bulletproof Contrast (17.5:1 WCAG AAA) */
select.saas-input {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: #111622 !important;
  color: #FFFFFF !important;
  padding-right: 38px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E2E8F0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px 15px;
  cursor: pointer;
}

select.saas-input option,
select.saas-input optgroup {
  background-color: #111622 !important;
  color: #FFFFFF !important;
  font-weight: 600;
}

/* Light Theme Form & Dropdown Overrides */
.theme-light .saas-input {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0F172A;
}

.theme-light .saas-input::placeholder {
  color: #475569;
  opacity: 1;
}

.theme-light .saas-input:focus {
  background-color: #FFFFFF;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-light select.saas-input {
  color-scheme: light !important;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F172A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.theme-light select.saas-input option,
.theme-light select.saas-input optgroup {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
}

/* Browser WebKit Autofill Shield (Dark & Light) */
input.saas-input:-webkit-autofill,
input.saas-input:-webkit-autofill:hover,
input.saas-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF !important;
  -webkit-box-shadow: 0 0 0 1000px #111622 inset !important;
  transition: background-color 9999s ease-out 0s;
}

.theme-light input.saas-input:-webkit-autofill,
.theme-light input.saas-input:-webkit-autofill:hover,
.theme-light input.saas-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0F172A !important;
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
}

.theme-light .claim-slug-box {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
}

.saas-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
  margin-bottom: 6px;
}

.theme-light .saas-label {
  color: #475569;
}

.saas-tab-btn {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.saas-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.saas-tab-btn.active {
  color: var(--accent-contrast-text);
  background: var(--accent-primary);
  box-shadow: 0 6px 20px -4px var(--accent-glow);
}

.theme-light .saas-tab-btn {
  color: #475569;
}

.theme-light .saas-tab-btn:hover {
  color: #0F172A;
  background: rgba(15, 23, 42, 0.06);
}

.theme-light .saas-tab-btn.active {
  color: var(--accent-contrast-text);
  background: var(--accent-primary);
}

.plan-card {
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.22s var(--spring-easing);
}

.plan-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.plan-card.selected {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
  box-shadow: 0 12px 36px -8px var(--accent-glow);
}

.rail-chip {
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.rail-chip.selected {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-badge-active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34D399;
}

.status-badge-past_due {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
}

.status-badge-expired,
.status-badge-canceled,
.status-badge-pending_payment {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}

.studio-scroll-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.studio-scroll-tabs::-webkit-scrollbar {
  display: none;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  transition: 0.22s ease;
}

.theme-light .toggle-slider {
  background: rgba(15, 23, 42, 0.22);
  border-color: rgba(15, 23, 42, 0.16);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: 0.22s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: #10B981;
  border-color: #10B981;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ==========================================================================
   LIQUID GLASS SEARCHABLE COMBOBOX & 672-PROFESSION COMMAND PICKER
   ========================================================================== */
.zg-combo-wrap {
  position: relative;
  width: 100%;
}

.zg-combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: #111622;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 11px 14px;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.zg-combo-trigger:hover,
.zg-combo-trigger[aria-expanded="true"] {
  border-color: var(--accent-primary);
  background-color: #161D2C;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-light .zg-combo-trigger {
  background-color: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0F172A;
}

.zg-combo-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9500;
  background: rgba(12, 16, 26, 0.985);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 10px;
  display: none;
}

.zg-combo-popover.open {
  display: block;
}

.theme-light .zg-combo-popover {
  background: rgba(255, 255, 255, 0.985);
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
}

.zg-combo-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  padding: 9px 12px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  margin-bottom: 8px;
}

.zg-combo-search::placeholder {
  color: #94A3B8;
}

.zg-combo-search:focus {
  border-color: var(--accent-primary);
}

.theme-light .zg-combo-search {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.14);
  color: #0F172A;
}

.theme-light .zg-combo-search::placeholder {
  color: #475569;
}

.zg-sector-pills {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.zg-sector-pills::-webkit-scrollbar {
  display: none;
}

.theme-light .zg-sector-pills {
  border-bottom-color: rgba(15, 23, 42, 0.09);
}

.zg-sector-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zg-sector-pill:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #FFFFFF;
}

.zg-sector-pill.active {
  background: var(--accent-primary);
  color: var(--accent-contrast-text);
  border-color: var(--accent-primary);
}

.theme-light .zg-sector-pill {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}

.theme-light .zg-sector-pill.active {
  background: var(--accent-primary);
  color: var(--accent-contrast-text);
}

.zg-combo-list {
  max-height: 270px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.zg-combo-option {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 11px;
  background: transparent;
  border: 1px solid transparent;
  color: #F8FAFC;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color 0.12s ease;
}

.zg-combo-option:hover,
.zg-combo-option.focused {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
}

.zg-combo-option.selected {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
}

.theme-light .zg-combo-option {
  color: #0F172A;
}

.theme-light .zg-combo-option:hover,
.theme-light .zg-combo-option.focused {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
}

.zg-combo-option-sub {
  font-size: 11px;
  color: #94A3B8;
}

.theme-light .zg-combo-option-sub {
  color: #475569;
}

/* Modal Light-Mode & Landscape Phone Safe Scroll */
.modal-overlay {
  overflow-y: auto !important;
  padding: 16px !important;
}

.modal-card-surface {
  background: rgba(16, 19, 27, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #FFFFFF !important;
}

.theme-light .modal-card-surface {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  color: #0F172A !important;
}

/* Light-Theme WCAG AAA Contrast Shield for Accent & Tint Utilities (> 7.0:1) */
.theme-light .text-accent-light {
  color: var(--accent-dark) !important;
}

.theme-light .text-emerald-300,
.theme-light .text-emerald-400,
.theme-light .text-emerald-200 {
  color: #065F46 !important;
}

.theme-light .text-sky-300,
.theme-light .text-sky-400,
.theme-light .text-sky-200 {
  color: #075985 !important;
}

.theme-light .text-amber-300,
.theme-light .text-amber-400,
.theme-light .text-amber-200 {
  color: #92400E !important;
}

.theme-light .text-purple-300,
.theme-light .text-purple-400 {
  color: #5B21B6 !important;
}

.theme-light .text-rose-300,
.theme-light .text-rose-400,
.theme-light .text-rose-200 {
  color: #9F1239 !important;
}
