/* ==========================================================================
   OPSRA ADVANCED LIGHT & DARK THEME ENGINE
   ========================================================================== */

/* --------------------------------------------------------------------------
   Theme Toggle Floating & Navbar Button
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  padding: 0;
  margin-left: 10px;
  position: relative;
  z-index: 999;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.theme-toggle-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

/* --------------------------------------------------------------------------
   LIGHT MODE OVERRIDES
   -------------------------------------------------------------------------- */
html.light-mode,
body.light-mode {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  
  /* Framer Global Theme Tokens */
  --token-5e3da66b-a97d-43a1-9bc2-92e9fd03e565: rgb(248, 250, 252) !important; /* Page background */
  --token-6f736482-00f8-4928-8b5f-342942aa76e8: rgb(226, 232, 240) !important; /* Border color */
  --token-b5c844e2-7a54-4d87-9b6d-3a7fb63127aa: rgb(255, 255, 255) !important; /* Card surface */
  --token-963e2c37-235b-4610-82cf-ea39892244b7: rgb(241, 245, 249) !important; /* Secondary background */
  --token-5ba75b1b-325e-49a3-a831-486521e69d36: rgb(241, 245, 249) !important; /* Button / tag */
  --token-382b681b-f39b-4faf-bf00-ab1dc35f01c3: rgb(15, 23, 42) !important;   /* Primary Headings */
  --token-7502f5ad-b355-4a12-a244-a58429acaad3: rgb(71, 85, 105) !important;  /* Body text */
  --token-8d29ccb4-0aa8-491a-8788-1d8fc78460b8: rgb(71, 85, 105) !important;  /* Nav links */
  --token-d51e9d36-a7ee-4d08-8c7a-f24b238dcbce: rgb(15, 23, 42) !important;   /* Primary Button BG */
  --token-1e115330-1b40-4f89-8b63-be8f9537e9ea: rgb(255, 255, 255) !important; /* Primary Button text */
}

/* Root canvas & background */
body.light-mode,
body.light-mode #main,
body.light-mode [data-framer-root],
body.light-mode [data-layout-template="true"] {
  background-color: #F8FAFC !important;
}

/* Logo inversion in light mode */
body.light-mode img[src*="siIFu0bYmAWkX5McUDj8I0vg1wU"],
body.light-mode [data-framer-name="Logo"] img {
  filter: brightness(0) !important;
}

/* Navbar */
body.light-mode nav,
body.light-mode [data-framer-name="Desktop"],
body.light-mode [data-framer-name="Phone"],
body.light-mode [data-framer-name="Tablet"] {
  background-color: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid #E2E8F0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode [data-framer-name="Nav Links Wrap"] {
  background: rgba(241, 245, 249, 0.7) !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-mode [data-framer-name="Nav Links Wrap"] a,
body.light-mode [data-framer-name="Text Button"] p {
  color: #475569 !important;
}

body.light-mode [data-framer-name="Nav Links Wrap"] a:hover {
  color: #0F172A !important;
}

/* Theme Toggle Button in Light Mode */
body.light-mode .theme-toggle-btn {
  border-color: #CBD5E1;
  background: #F1F5F9;
  color: #0F172A;
}

body.light-mode .theme-toggle-btn:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
}

/* Hero Dark Textures Dimming */
body.light-mode [data-framer-name="Abstract BG Image"],
body.light-mode [data-framer-name="Cotton bg"],
body.light-mode [data-framer-name="image"] img {
  opacity: 0.12 !important;
  filter: invert(0.9) brightness(1.2) !important;
}

/* Typography & Headings */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode .framer-text h1,
body.light-mode .framer-text h2,
body.light-mode .framer-text h3 {
  color: #0F172A !important;
  --framer-text-color: #0F172A !important;
}

body.light-mode p,
body.light-mode [data-framer-component-type="RichTextContainer"] p {
  color: #475569 !important;
  --framer-text-color: #475569 !important;
}

/* Heading Gradients in Light Mode */
body.light-mode [data-text-fill="true"] {
  background-image: linear-gradient(90deg, #0F172A 0%, #00B4D8 75%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Primary "Get Started Free" Buttons */
body.light-mode [data-framer-name="Primary Button"] .framer-fp5u2d,
body.light-mode [data-framer-name="Get Started Free"] .framer-fp5u2d {
  background-color: #0F172A !important;
  border: 1px solid #0F172A !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18) !important;
}

body.light-mode [data-framer-name="Primary Button"] p,
body.light-mode [data-framer-name="Get Started Free"] p {
  color: #FFFFFF !important;
  --framer-text-color: #FFFFFF !important;
  font-weight: 600 !important;
}

/* Secondary "Read more" Buttons */
body.light-mode [data-framer-name="Secondary Button Small"] .framer-fp5u2d,
body.light-mode [data-framer-name="Secondary Small Tab/Mob"] .framer-fp5u2d {
  background-color: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode [data-framer-name="Secondary Button Small"] p,
body.light-mode [data-framer-name="Secondary Small Tab/Mob"] p {
  color: #0F172A !important;
  --framer-text-color: #0F172A !important;
}

/* Badges / Pill Tags (AI PRODUCTIVITY / SMART INSIGHTS) */
body.light-mode [data-framer-name="Tag Wrap"] .framer-7YZrF,
body.light-mode [data-framer-name="Variant 1"][style*="backdrop-filter"] {
  background-color: rgba(0, 200, 190, 0.15) !important;
  border: 1px solid rgba(0, 180, 170, 0.3) !important;
  backdrop-filter: blur(10px) !important;
}

body.light-mode [data-framer-name="AI WORKFLOWS"] p,
body.light-mode [data-framer-name="AI WORKFLOW"] p,
body.light-mode [data-framer-name="Tag Wrap"] p {
  color: #0D9488 !important;
  --framer-text-color: #0D9488 !important;
  font-weight: 700 !important;
}

/* Hero Floating "Hey there" Card & Testimonial Box */
body.light-mode [data-framer-name="Deesktop Default"],
body.light-mode [data-framer-name="Tab"],
body.light-mode [data-framer-name="Closed"] {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08) !important;
}

body.light-mode [data-framer-name="Hey there"] h3 {
  color: #0F172A !important;
}

/* Process Section Tabs & Stepper */
body.light-mode [data-framer-name="Tabs Container"] {
  background-color: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-mode [data-framer-name="Tabs Container"] [data-framer-name="Desktop"],
body.light-mode [data-framer-name="Tabs Container"] [data-framer-name="Mob Default"] {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

body.light-mode [data-framer-name="Tabs Container"] [data-framer-name="Process"] h3,
body.light-mode [data-framer-name="Tabs Container"] [data-framer-name="Process"] p {
  color: #0F172A !important;
  --framer-text-color: #0F172A !important;
  opacity: 1 !important;
}

body.light-mode [data-framer-name="Setp 1"] .framer-LCVbH,
body.light-mode [data-framer-name="Content Container"] {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

/* Pricing Cards */
body.light-mode [data-framer-name="Card 1"],
body.light-mode [data-framer-name="Card 2"],
body.light-mode [data-framer-name="Card 3"],
body.light-mode [data-framer-name="Pricing Card Wrapper"] > div {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

body.light-mode [data-framer-name="Plan"] {
  background-color: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-mode [data-framer-name="Basic Plan"] p,
body.light-mode [data-framer-name="Pro Plan"] p,
body.light-mode [data-framer-name="Enterprise Plan"] p {
  color: #0F172A !important;
  --framer-text-color: #0F172A !important;
}

/* FAQ Section Accordion */
body.light-mode [data-framer-name="FAQ Section"] [data-framer-name="Container"],
body.light-mode [data-framer-name="Accordion Item"] {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
}

/* Partner Logo Cloud (Harvard, Yale, etc.) */
body.light-mode [data-framer-name="Logo Cloud Wrapper"] img,
body.light-mode [data-framer-name="Trusted By"] img {
  filter: brightness(0.2) contrast(1.2) !important;
  opacity: 0.75 !important;
}

/* Footer Container */
body.light-mode footer,
body.light-mode [data-framer-name="Footer"] {
  background-color: #F1F5F9 !important;
  border-top: 1px solid #E2E8F0 !important;
}

/* SVG Line Icons inversion for light backgrounds */
body.light-mode [data-framer-name="Icon"] img[src$=".svg"],
body.light-mode [data-framer-component-type="SVG"]:not(.theme-toggle-btn *) {
  filter: brightness(0.2) !important;
}

/* General Border Overrides */
body.light-mode [data-border="true"] {
  border-color: #E2E8F0 !important;
  --border-color: #E2E8F0 !important;
}
