/* ============================================================
   JaatCloud jc-theme.css — Light theme overrides + theme toggle
   Default remains DARK. [data-theme="light"] flips the palette.
   ============================================================ */

:root {
  --jc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

/* ---------- LIGHT THEME PALETTE ---------- */
html[data-theme="light"] {
  --bg: #f4f6fb;
  --surface: rgba(15, 23, 42, 0.04);
  --surface-2: rgba(15, 23, 42, 0.07);
  --line: rgba(15, 23, 42, 0.12);
  --muted: rgba(15, 23, 42, 0.6);
  --shadow: 0 24px 60px rgba(30, 41, 59, 0.14);
  --t-primary: #0f172a;
  --text-primary: #0f172a;
}

html[data-theme="light"] body {
  background: var(--bg);
  background-image:
    linear-gradient(rgba(59,130,246,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(59,130,246,0.12), transparent 34rem);
  color: #0f172a;
}

html[data-theme="light"] body::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.5), transparent 18%, transparent 82%, rgba(255,255,255,0.5)),
    linear-gradient(180deg, transparent 65%, var(--bg));
}

html[data-theme="light"] ::selection { background: rgba(59,130,246,0.25); color: #0f172a; }

/* Nav */
html[data-theme="light"] .premium-nav {
  background: rgba(255,255,255,0.82);
  border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .premium-nav__brand,
html[data-theme="light"] .premium-nav a,
html[data-theme="light"] .premium-nav button { color: #0f172a; }

/* Generic text + surfaces: catch common utility classes used across pages */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] span,
html[data-theme="light"] label,
html[data-theme="light"] td,
html[data-theme="light"] th { color: inherit; }

html[data-theme="light"] .service-card,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .review-card,
html[data-theme="light"] .card,
html[data-theme="light"] .glass-card,
html[data-theme="light"] .pricing-card,
html[data-theme="light"] .plan-card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .stats-showcase__grid article {
  background: rgba(255,255,255,0.75);
  border-color: rgba(15,23,42,0.1);
  box-shadow: 0 10px 34px rgba(30,41,59,0.1);
  color: #0f172a;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: rgba(255,255,255,0.9) !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,0.18) !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: rgba(15,23,42,0.45); }

html[data-theme="light"] footer,
html[data-theme="light"] .site-footer {
  background: rgba(255,255,255,0.7);
  border-top-color: rgba(15,23,42,0.08);
  color: #0f172a;
}

/* Modal + dropdown surfaces */
html[data-theme="light"] .auth-modal-box,
html[data-theme="light"] .modal-box,
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .menu-dropdown {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15,23,42,0.1);
}

/* Smooth palette transition when toggling */
html.jc-theme-anim,
html.jc-theme-anim *,
html.jc-theme-anim *::before,
html.jc-theme-anim *::after {
  transition: background-color .45s var(--jc-ease), color .45s var(--jc-ease),
              border-color .45s var(--jc-ease), box-shadow .45s var(--jc-ease),
              fill .45s var(--jc-ease), stroke .45s var(--jc-ease) !important;
}

/* ---------- THEME TOGGLE BUTTON ---------- */
.jc-theme-toggle {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(59,130,246,0.35);
  background: linear-gradient(145deg, #101726, #0a0f1c);
  color: #facc15;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 0 rgba(59,130,246,0.4);
  transition: transform .3s var(--jc-ease), box-shadow .3s var(--jc-ease), background .45s var(--jc-ease);
  animation: jcTogglePulse 4.5s ease-in-out infinite;
}
html[data-theme="light"] .jc-theme-toggle {
  background: linear-gradient(145deg, #ffffff, #e8eefb);
  color: #f59e0b;
  box-shadow: 0 8px 24px rgba(30,41,59,0.18), 0 0 0 0 rgba(59,130,246,0.3);
}
.jc-theme-toggle:hover { transform: translateY(-3px) scale(1.07) rotate(8deg); }
.jc-theme-toggle:active { transform: scale(0.94); }
.jc-theme-toggle svg { width: 24px; height: 24px; transition: transform .5s var(--jc-ease), opacity .3s; }
.jc-theme-toggle .jc-icon-moon { display: none; }
html[data-theme="light"] .jc-theme-toggle .jc-icon-sun { display: none; }
html[data-theme="light"] .jc-theme-toggle .jc-icon-moon { display: block; }
.jc-theme-toggle:hover svg { transform: rotate(40deg) scale(1.12); }

@keyframes jcTogglePulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 0 rgba(59,130,246,0.35); }
  50% { box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 12px rgba(59,130,246,0); }
}

@media (max-width: 640px) {
  .jc-theme-toggle { width: 44px; height: 44px; bottom: 16px; left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .jc-theme-toggle { animation: none; }
  html.jc-theme-anim, html.jc-theme-anim *, html.jc-theme-anim *::before, html.jc-theme-anim *::after { transition: none !important; }
}

/* ============================================================
   v73.94 (A5) LIGHT THEME SUPPLEMENT — sections the first pass
   missed (hard-coded dark surfaces): scrolled nav, ghost button,
   FAQ premium cards, Discord CTA banner, more-panel, gtp states.
   ============================================================ */
html[data-theme="light"] .premium-nav.jc-scrolled {
  background: rgba(255,255,255,0.88);
  box-shadow: 0 8px 30px rgba(30,41,59,0.12);
  border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .premium-button--ghost { background: rgba(15,23,42,0.045); color: #0f172a; }
html[data-theme="light"] .premium-button--ghost:hover { border-color: rgba(59,130,246,0.65); background: rgba(59,130,246,0.1); color: #0f172a; }

/* FAQ premium section */
html[data-theme="light"] .faq-premium__item { background: rgba(255,255,255,0.82); border-color: rgba(15,23,42,0.1); }
html[data-theme="light"] .faq-premium__item.is-open { background: linear-gradient(135deg, rgba(59,130,246,0.07), rgba(255,255,255,0.88)); }
html[data-theme="light"] .faq-premium__item button strong { color: #0f172a; }
html[data-theme="light"] .faq-premium__item button p,
html[data-theme="light"] .faq-premium__item button span:not(.faq-premium__number) { color: rgba(15,23,42,0.7); }
html[data-theme="light"] .faq-premium__number { color: rgba(15,23,42,0.45); }
html[data-theme="light"] .faq-premium__aside { background: linear-gradient(145deg, #ffffff, rgba(241,245,251,0.9)); border-color: rgba(15,23,42,0.1); }
html[data-theme="light"] .faq-premium__aside small { color: rgba(15,23,42,0.55); }
html[data-theme="light"] .faq-premium__aside h2 { color: #0f172a; }
html[data-theme="light"] .faq-premium__aside p { color: rgba(15,23,42,0.65); }
html[data-theme="light"] .faq-premium__hero h2,
html[data-theme="light"] .faq-premium__hero p { color: #0f172a; }
html[data-theme="light"] .faq-discord { background: linear-gradient(135deg, rgba(88,101,242,0.12), rgba(255,255,255,0.9)); border-color: rgba(88,101,242,0.35); }
html[data-theme="light"] .faq-discord small { color: rgba(15,23,42,0.55); }
html[data-theme="light"] .faq-discord h2 { color: #0f172a; }
html[data-theme="light"] .faq-discord p { color: rgba(15,23,42,0.6); }

/* More panel (mobile) + floating dock in light */
html[data-theme="light"] .more-panel { background: rgba(255,255,255,0.97); }
html[data-theme="light"] .more-panel a, html[data-theme="light"] .mp-col-title { color: #0f172a; }
html[data-theme="light"] .floating-dock { background: rgba(255,255,255,0.9); border-color: rgba(15,23,42,0.1); }
html[data-theme="light"] .floating-dock .dock-item { color: #0f172a; }

/* Product page + dashboard state chips */
html[data-theme="light"] .gtp-state { background: rgba(15,23,42,0.05); border-color: rgba(15,23,42,0.15); color: #7c5a00; }
html[data-theme="light"] .gtp-state--ok { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.35); color: #065f46; }
html[data-theme="light"] .gtp-state--warn { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.4); color: #991b1b; }

/* ===== v74.20: in-navbar variant (top button row) ===== */
.premium-nav__actions .jc-theme-toggle {
  position: static;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: none;
  animation: none;
}
html[data-theme="light"] .premium-nav__actions .jc-theme-toggle { background: rgba(2,6,23,.05); border-color: rgba(2,6,23,.12); }
.premium-nav__actions .jc-theme-toggle svg { width: 17px; height: 17px; }
.premium-nav__actions .jc-theme-toggle:hover { transform: none; border-color: rgba(59,130,246,.55); background: rgba(59,130,246,.10); }
@media (max-width: 768px) { .premium-nav__actions .jc-theme-toggle { width: 32px; height: 32px; border-radius: 9px; } }
