/**
 * digitalPuppy.Store - Theme Engine (Dark / Light Mode)
 * Default: Light Mode (#EEF4FA light blue palette)
 * Toggleable to Dark Mode (#090A0F cyber-black palette)
 */

/* ==========================================================================
   1. GLOBAL TRANSITIONS & DEFAULTS
   ========================================================================== */
html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

body,
header,
nav,
footer,
.glass-panel,
.glass-panel-orange,
.bg-cyber-card,
.bg-cyber-black,
.bg-cyber-dark,
.bg-cyber-darker,
.theme-card,
input,
textarea,
select,
button {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* ==========================================================================
   2. LIGHT MODE OVERRIDES (SOFT LIGHT BLUE PALETTE #EEF4FA)
   ========================================================================== */

/* Body & Canvas: Clean Soft Light Blue */
html.light body {
    background-color: #EEF4FA !important;
    color: #0B192C !important;
}

/* Custom Scrollbar in Light Blue Mode */
html.light ::-webkit-scrollbar-track {
    background: #E3EEF8 !important;
}
html.light ::-webkit-scrollbar-thumb {
    background: #BACFE4 !important;
    border-radius: 4px;
}
html.light ::-webkit-scrollbar-thumb:hover {
    background: #FF6B00 !important;
}

/* Selection */
html.light ::selection {
    background-color: #FF6B00 !important;
    color: #FFFFFF !important;
}

/* Cyber Grid in Light Mode (subtle deep blue grid lines) */
html.light .cyber-grid {
    background-image: 
        linear-gradient(to right, rgba(14, 50, 95, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(14, 50, 95, 0.04) 1px, transparent 1px) !important;
}

/* Ambient Glowing Orbs on Light Blue */
html.light .fixed.inset-0 .bg-brand-orange\/15,
html.light .fixed.inset-0 .bg-brand-orange\/10,
html.light .fixed.inset-0 .bg-amber-600\/10 {
    opacity: 0.28 !important;
}

/* ==========================================================================
   3. BRAND LOGO - ROCK SOLID VISIBILITY FIX IN LIGHT MODE
   ========================================================================== */

/* Logo Mascot Inner Box */
html.light .brand-logo-box,
html.light header a .w-11 > div,
html.light footer a .w-11 > div {
    background-color: #0A1120 !important;
}

/* Puppy SVG Mascot */
html.light .brand-logo-icon,
html.light header a .w-11 svg,
html.light footer a .w-11 svg {
    color: #FF6B00 !important;
    stroke: #FF6B00 !important;
}

html.light header a:hover .w-11 svg,
html.light footer a:hover .w-11 svg {
    color: #FFA04D !important;
    stroke: #FFA04D !important;
}

/* "digital" in logo */
html.light .brand-logo-title,
html.light header a .text-xl,
html.light footer a .text-xl {
    color: #0B192C !important;
}

/* "Puppy" in logo */
html.light .brand-logo-title .text-brand-orange,
html.light header a .text-xl .text-brand-orange,
html.light footer a .text-xl .text-brand-orange {
    color: #FF6B00 !important;
}

/* ".Store" badge */
html.light header a .text-xs.rounded,
html.light footer a .text-xs.rounded {
    background-color: rgba(255, 107, 0, 0.14) !important;
    color: #FF6B00 !important;
    border-color: rgba(255, 107, 0, 0.35) !important;
}

/* "V2Ray / Xray Protocols" tagline */
html.light header a span.font-mono,
html.light footer a span.font-mono {
    color: #4B617E !important;
}

/* ==========================================================================
   4. NAVIGATION BAR & HEADER (Light Blue Glass)
   ========================================================================== */
html.light header {
    background-color: rgba(235, 243, 252, 0.88) !important;
    border-bottom: 1px solid rgba(186, 215, 244, 0.75) !important;
    box-shadow: 0 4px 20px -2px rgba(14, 50, 95, 0.05) !important;
}

/* Nav links */
html.light nav a:not(.bg-brand-orange):not(.text-brand-orange) {
    color: #2D4158 !important;
}
html.light nav a:not(.bg-brand-orange):not(.text-brand-orange):hover {
    color: #FF6B00 !important;
}

/* Active Nav Links */
html.light nav a.text-brand-orange {
    color: #FF6B00 !important;
}

/* Buttons in nav (Language, Theme toggle) */
html.light .bg-cyber-card {
    background-color: #F4F8FD !important;
    border-color: rgba(186, 215, 244, 0.8) !important;
    color: #1A2B3C !important;
    box-shadow: 0 2px 8px rgba(14, 50, 95, 0.05) !important;
}

html.light .bg-cyber-card:hover {
    background-color: #FFFFFF !important;
    border-color: rgba(255, 107, 0, 0.5) !important;
}

/* Dropdown menus & mobile drawer */
html.light .glass-panel[x-show],
html.light header .glass-panel {
    background-color: rgba(246, 250, 255, 0.98) !important;
    border: 1px solid rgba(186, 215, 244, 0.85) !important;
    box-shadow: 0 12px 35px -5px rgba(14, 50, 95, 0.12) !important;
}

/* ==========================================================================
   5. COMPLETE TYPOGRAPHY, HEADINGS, NUMBERS & TEXT COLOR FIXES
   ========================================================================== */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6 {
    color: #0B192C !important;
}

/* Base text color for all paragraphs, lists, spans, numbers */
html.light body,
html.light main,
html.light section,
html.light p,
html.light li,
html.light label {
    color: #1A2B3C;
}

/* Turn all generic white text into deep crisp navy */
html.light .text-white:not(.keep-white):not(button.bg-brand-orange *):not(a.bg-brand-orange *):not(.bg-gradient-to-r.from-brand-orange *):not(.bg-gradient-to-br.from-brand-orange *):not(.bg-gradient-to-r.from-emerald-500 *):not(.bg-gradient-to-br.from-emerald-400 *) {
    color: #0B192C !important;
}

html.light strong.text-white {
    color: #0B192C !important;
}

html.light .text-slate-100,
html.light .text-slate-200 {
    color: #1A2B3C !important;
}
html.light .text-slate-300 {
    color: #2D4158 !important;
}
html.light .text-slate-400 {
    color: #3E546E !important;
}
html.light .text-slate-500 {
    color: #4B617E !important;
}

/* Hover states that previously turned text white on light background */
html.light .hover\:text-white:hover {
    color: #FF6B00 !important;
}
html.light .group:hover .group-hover\:text-white {
    color: #FF6B00 !important;
}
html.light .group:hover .group-hover\:text-slate-100 {
    color: #0B192C !important;
}

/* Brand orange text (e.g. step numbers 01, 02, 03, FAQ numbers 01-04, icons) */
html.light .text-brand-orange {
    color: #FF6B00 !important;
}

/* Rich readable amber note text instead of washed-out white/pale text-amber-200 */
html.light .text-amber-200,
html.light .text-amber-200 * {
    color: #78350F !important; /* Deep dark amber brown - maximum contrast */
}
html.light .text-amber-400 {
    color: #92400E !important; /* High contrast dark amber */
}

/* Emerald green tags (e.g. 100% WORKING IN SRI LANKA) */
html.light .text-emerald-400 {
    color: #047857 !important; /* Deep emerald */
}
html.light .bg-emerald-500\/15 {
    background-color: rgba(5, 150, 105, 0.12) !important;
    border-color: rgba(5, 150, 105, 0.3) !important;
}

/* Large phone number on contact section: crisp navy, orange on hover */
html.light a[href^="tel:"] {
    color: #0B192C !important;
}
html.light a[href^="tel:"]:hover {
    color: #FF6B00 !important;
}

/* Gradient Text adaptation for light blue theme - ensure NO white start stop */
html.light .text-gradient-orange {
    background: linear-gradient(135deg, #C2410C 0%, #EA580C 50%, #FF6B00 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #EA580C !important;
}

html.light .text-glow-orange {
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.28) !important;
}

/* Step Numbers & Badges (01, 02, 03) */
html.light #steps .bg-brand-orange\/20 {
    background-color: rgba(255, 107, 0, 0.14) !important;
    border-color: rgba(255, 107, 0, 0.4) !important;
    color: #FF6B00 !important;
}

/* Step 2 platform breakdown boxes in light mode */
html.light #steps .space-y-2\.5 .bg-white\/5 {
    background-color: #E8F2FA !important;
    border-color: #BED5EC !important;
}
html.light #steps .space-y-2\.5 .text-slate-300 {
    color: #1A2B3C !important;
    font-weight: 600 !important;
}

/* FAQ Accordion Numbers (01, 02, 03, 04) */
html.light #faq .bg-brand-orange\/15 {
    background-color: rgba(255, 107, 0, 0.14) !important;
    color: #FF6B00 !important;
}

/* Note box in about.php (was dark with washed-out text) */
html.light .bg-amber-500\/10 {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(217, 119, 6, 0.45) !important;
}
html.light .bg-amber-500\/10 ul {
    color: #0B192C !important;
}
html.light .bg-amber-500\/10 ul span {
    color: #0B192C !important;
}
html.light .bg-amber-500\/10 span.text-brand-orange {
    color: #FF6B00 !important;
}

/* Upcoming ISP plans secondary button */
html.light a[href="index.php#pricing"].bg-white\/5 {
    background-color: #E2EEF8 !important;
    border-color: #BACFE4 !important;
    color: #1A2B3C !important;
}
html.light a[href="index.php#pricing"].bg-white\/5:hover {
    background-color: #D3E5F5 !important;
    color: #FF6B00 !important;
    border-color: #FF6B00 !important;
}

/* ==========================================================================
   6. SOLID ACCENT BUTTONS & BADGES (KEEP PURE WHITE TEXT)
   ========================================================================== */
html.light button.bg-brand-orange,
html.light button.bg-brand-orange *,
html.light a.bg-brand-orange,
html.light a.bg-brand-orange *,
html.light .bg-gradient-to-r.from-brand-orange,
html.light .bg-gradient-to-r.from-brand-orange *,
html.light .bg-gradient-to-br.from-brand-orange,
html.light .bg-gradient-to-br.from-brand-orange *,
html.light .bg-gradient-to-r.from-emerald-500,
html.light .bg-gradient-to-r.from-emerald-500 *,
html.light .btn-orange,
html.light .keep-white,
html.light .keep-white * {
    color: #FFFFFF !important;
}

/* ==========================================================================
   7. CARDS, PANELS & GLASSMORPHISM (Light Blue Tinted)
   ========================================================================== */
html.light .glass-panel {
    background: rgba(246, 250, 255, 0.9) !important;
    border: 1px solid rgba(186, 215, 244, 0.75) !important;
    box-shadow: 0 10px 30px -5px rgba(14, 50, 95, 0.06), 0 0 0 1px rgba(220, 235, 250, 0.8) !important;
}

html.light .glass-panel-orange {
    background: rgba(246, 250, 255, 0.95) !important;
    border: 1px solid rgba(255, 107, 0, 0.3) !important;
    box-shadow: 0 12px 35px -5px rgba(255, 107, 0, 0.12), 0 0 0 1px rgba(255, 107, 0, 0.15) !important;
}

html.light .glass-panel-hover:hover {
    background: #FFFFFF !important;
    border-color: rgba(255, 107, 0, 0.5) !important;
    box-shadow: 0 16px 40px -8px rgba(255, 107, 0, 0.18), 0 0 0 1px rgba(186, 215, 244, 0.9) !important;
}

/* Cyber dark utility classes mapped to soft light blue variants */
html.light .bg-cyber-black {
    background-color: #EEF4FA !important;
}
html.light .bg-cyber-dark {
    background-color: #E6F0F8 !important;
}
html.light .bg-cyber-darker {
    background-color: #EEF4FA !important;
}
html.light .bg-cyber-darker\/60 {
    background-color: rgba(230, 240, 248, 0.75) !important;
}

/* Hardcoded hex backgrounds in ISP section & cards */
html.light .bg-\[\#0D0E13\] {
    background-color: #F8FBFE !important;
    border: 1px solid rgba(186, 215, 244, 0.75) !important;
    box-shadow: 0 8px 30px -6px rgba(14, 50, 95, 0.07) !important;
}

html.light .bg-\[\#111218\] {
    background-color: #DFECF8 !important;
    border: 1px solid rgba(175, 206, 238, 0.85) !important;
}

html.light .bg-\[\#14151D\] {
    background-color: #E8F2FB !important;
    border: 1px solid rgba(186, 215, 244, 0.6) !important;
}

html.light .bg-\[\#191A23\] {
    background-color: #FFFFFF !important;
    border: 1px solid #A3CAEE !important;
    color: #0B192C !important;
    box-shadow: 0 2px 8px rgba(14, 50, 95, 0.08) !important;
}

/* Note box in about.php (was dark with washed-out text) */
html.light .bg-brand-orange\/15 {
    background-color: rgba(255, 107, 0, 0.08) !important;
    border-color: rgba(255, 107, 0, 0.25) !important;
}

html.light .bg-brand-orange\/10 {
    background-color: rgba(255, 107, 0, 0.06) !important;
    border-color: rgba(255, 107, 0, 0.2) !important;
}

/* Router banner gradient fade into light blue card */
html.light .from-\[\#0D0E13\] {
    --tw-gradient-from: #F8FBFE var(--tw-gradient-from-position) !important;
}
html.light .via-\[\#0D0E13\]\/50 {
    --tw-gradient-stops: var(--tw-gradient-from), rgba(248, 251, 254, 0.6) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}

/* Top-right active badge on router banner */
html.light .bg-black\/80 {
    background-color: rgba(244, 248, 253, 0.92) !important;
    border-color: rgba(186, 215, 244, 0.8) !important;
}

/* ==========================================================================
   8. BORDERS & SHADOWS (Sky/Slate Blue)
   ========================================================================== */
html.light .border-white\/5 {
    border-color: rgba(14, 50, 95, 0.07) !important;
}
html.light .border-white\/10 {
    border-color: rgba(14, 50, 95, 0.12) !important;
}
html.light .border-white\/20 {
    border-color: rgba(14, 50, 95, 0.18) !important;
}
html.light .border-zinc-800\/80 {
    border-color: rgba(186, 215, 244, 0.85) !important;
}
html.light .shadow-cyber-card {
    box-shadow: 0 10px 30px -5px rgba(14, 50, 95, 0.08), 0 1px 3px rgba(14, 50, 95, 0.04) !important;
}

/* Translucent layer overlays */
html.light .bg-white\/5 {
    background-color: rgba(14, 50, 95, 0.04) !important;
}
html.light .bg-white\/10 {
    background-color: rgba(14, 50, 95, 0.07) !important;
}

/* ==========================================================================
   9. FORMS, INPUTS & CONTROLS
   ========================================================================== */
html.light input[type="text"],
html.light input[type="email"],
html.light input[type="search"],
html.light textarea,
html.light select {
    background-color: #FFFFFF !important;
    color: #0B192C !important;
    border-color: #BED6EC !important;
    box-shadow: 0 1px 2px rgba(14, 50, 95, 0.04) !important;
}

html.light input::placeholder {
    color: #7A93AC !important;
}

html.light input:focus,
html.light textarea:focus,
html.light select:focus {
    border-color: #FF6B00 !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18) !important;
}

/* ==========================================================================
   10. MODALS, DRAWERS & ACCORDIONS
   ========================================================================== */
html.light .fixed.inset-0.bg-black\/80 {
    background-color: rgba(10, 25, 45, 0.6) !important;
}

html.light .fixed.inset-0 .glass-panel {
    background-color: #F4F8FD !important;
    border-color: rgba(255, 107, 0, 0.35) !important;
    box-shadow: 0 25px 60px -15px rgba(10, 25, 45, 0.25) !important;
}

html.light .fixed.inset-0 .glass-panel h2,
html.light .fixed.inset-0 .glass-panel h3,
html.light .fixed.inset-0 .glass-panel h4 {
    color: #0B192C !important;
}

html.light .fixed.inset-0 .glass-panel .bg-white\/5 {
    background-color: #FFFFFF !important;
    border: 1px solid rgba(186, 215, 244, 0.8) !important;
    box-shadow: 0 2px 6px rgba(14, 50, 95, 0.04) !important;
}

html.light .fixed.inset-0 .glass-panel .text-slate-300 {
    color: #2D4158 !important;
}

html.light .fixed.inset-0 .glass-panel .text-slate-200 {
    color: #1A2B3C !important;
}

html.light .fixed.inset-0 .glass-panel .pkg-spec-box {
    background-color: #FFFFFF !important;
    border: 1px solid rgba(186, 215, 244, 0.8) !important;
}

html.light .fixed.inset-0 .glass-panel .pkg-spec-box .text-white {
    color: #0B192C !important;
}

html.light .mt-20 .bg-white\/5 {
    background-color: #FFFFFF !important;
    border: 1px solid rgba(186, 215, 244, 0.8) !important;
    box-shadow: 0 4px 15px -3px rgba(14, 50, 95, 0.06) !important;
}

html.light .mt-20 .bg-white\/5 h4 {
    color: #0B192C !important;
}

html.light .mt-20 .bg-white\/5 p {
    color: #4B617E !important;
}

/* Accordions in about.php */
html.light #faq .glass-panel {
    background-color: #F4F8FD !important;
    border-color: rgba(186, 215, 244, 0.8) !important;
}

/* Footer in Light Mode */
html.light footer {
    background-color: #E3EEF8 !important;
    border-top: 1px solid rgba(186, 215, 244, 0.8) !important;
    color: #4B617E !important;
}

/* ==========================================================================
   11. TOAST NOTIFICATIONS
   ========================================================================== */
html.light .pointer-events-auto.p-4 {
    background-color: rgba(246, 250, 255, 0.98) !important;
    color: #0B192C !important;
    border-color: rgba(255, 107, 0, 0.4) !important;
    box-shadow: 0 15px 35px -5px rgba(14, 50, 95, 0.15) !important;
}

/* ==========================================================================
   12. THEME TOGGLE BUTTON SPECIAL STYLING
   ========================================================================== */
.theme-toggle-btn {
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle-btn:active {
    transform: scale(0.92);
}

html.dark .theme-toggle-btn {
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.15);
}

html.light .theme-toggle-btn {
    box-shadow: 0 2px 8px rgba(14, 50, 95, 0.08);
}

/* ==========================================================================
   13. REDESIGNED PACKAGE & PRICING CARDS
   ========================================================================== */
.pkg-card {
    background-color: #12141F;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pkg-card:hover {
    border-color: rgba(255, 107, 0, 0.45);
    box-shadow: 0 20px 45px -10px rgba(255, 107, 0, 0.15);
}

.pkg-card-popular {
    background: linear-gradient(180deg, #181B2A 0%, #12141F 100%);
    border: 2px solid rgba(255, 107, 0, 0.65);
    box-shadow: 0 0 35px -5px rgba(255, 107, 0, 0.25);
}

.pkg-card-popular:hover {
    border-color: #FF7A1A;
    box-shadow: 0 0 50px -5px rgba(255, 107, 0, 0.4);
}

/* Light mode for package cards */
html.light .pkg-card {
    background-color: #FFFFFF !important;
    border: 1px solid rgba(186, 215, 244, 0.85) !important;
    box-shadow: 0 10px 30px -5px rgba(14, 50, 95, 0.06), 0 1px 3px rgba(14, 50, 95, 0.04) !important;
}

html.light .pkg-card:hover {
    border-color: rgba(255, 107, 0, 0.6) !important;
    box-shadow: 0 20px 45px -10px rgba(14, 50, 95, 0.12), 0 0 0 1px rgba(255, 107, 0, 0.3) !important;
}

html.light .pkg-card-popular {
    background: #FFFFFF !important;
    border: 2px solid #FF6B00 !important;
    box-shadow: 0 15px 40px -5px rgba(255, 107, 0, 0.2), 0 0 0 1px rgba(255, 107, 0, 0.25) !important;
}

html.light .pkg-card-popular:hover {
    border-color: #FF7A1A !important;
    box-shadow: 0 22px 50px -5px rgba(255, 107, 0, 0.3) !important;
}

html.light .pkg-card h3 {
    color: #0B192C !important;
}

html.light .pkg-card .pkg-validity {
    color: #0B192C !important;
}

html.light .pkg-card .pkg-spec-box {
    background-color: #F4F8FD !important;
    border: 1px solid rgba(186, 215, 244, 0.8) !important;
}

html.light .pkg-card .border-b,
html.light .pkg-card .border-t {
    border-color: rgba(186, 215, 244, 0.7) !important;
}

html.light .pkg-card .text-slate-400 {
    color: #4B617E !important;
}

html.light .pkg-card .text-slate-500 {
    color: #5A718F !important;
}

html.light .pkg-card .bg-white\/5 {
    background-color: rgba(14, 50, 95, 0.05) !important;
    border-color: rgba(186, 215, 244, 0.8) !important;
}

html.light .pkg-card li {
    color: #1A2B3C !important;
}

html.light .pkg-card li span.font-medium {
    color: #1A2B3C !important;
}

html.light .pkg-btn-regular {
    background-color: #EEF5FC !important;
    border: 1px solid #BACFE4 !important;
    color: #0B192C !important;
}

html.light .pkg-btn-regular:hover {
    background-color: #FF6B00 !important;
    border-color: #FF6B00 !important;
    color: #FFFFFF !important;
}

html.light .pkg-btn-regular:hover * {
    color: #FFFFFF !important;
}
