/**
 * Theme Toggle Styles
 * Dark/Light mode switcher
 */

/* Light Mode Variables */
[data-theme="light"] {
    /* Background Colors */
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef1f4;
    --bg-card: #ffffff;
    --bg-grouped: #f2f2f7;

    /* Text Colors */
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-tertiary: #6e6e73;
    --text-muted: #86868b;

    /* Border Colors */
    --border-primary: #d9d9de;
    --border-secondary: #c7c7cc;

    /* Shadows */
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 28px 56px rgba(15, 23, 42, 0.12);
    color-scheme: light;
}

/* Theme Toggle Button */
/* Theme Toggle Button (Sidebar Integrated) */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    border-color: var(--primary);
}

.theme-toggle i,
.theme-toggle svg,
.theme-toggle svg * {
    pointer-events: none;
}

/* In sidebar footer - remove any fixed positioning */
.sidebar-footer .theme-toggle {
    position: static;
    flex-shrink: 0;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    height: auto;
    padding: 0.9rem 1rem;
    justify-content: flex-start;
    gap: 0.8rem;
    border-radius: 14px;
}



/* Dark mode icon (moon) */
.theme-toggle[data-theme="dark"] .icon-moon {
    display: block;
}

.theme-toggle[data-theme="dark"] .icon-sun {
    display: none;
}

/* Light mode icon (sun) */
.theme-toggle[data-theme="light"] .icon-sun {
    display: block;
}

.theme-toggle[data-theme="light"] .icon-moon {
    display: none;
}

/* Animation when switching */
@keyframes themeSwitch {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(0.92) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.theme-toggle.switching .theme-toggle-icon {
    animation: themeSwitch var(--lb-motion-duration-slow) var(--lb-motion-ease-standard);
}

/* Logo SVG color handling */
/* Dark mode - Logo should be white */
[data-theme="dark"] .logo-svg,
[data-theme="dark"] .brand-logo,
[data-theme="dark"] img[src*="LINKBOOSTY_LOGO"] {
    filter: brightness(0) invert(1);
}

/* Light mode - Logo should be black (original) */
[data-theme="light"] .logo-svg,
[data-theme="light"] .brand-logo,
[data-theme="light"] img[src*="LINKBOOSTY_LOGO"] {
    filter: brightness(1) invert(0);
}

/* Phone mockup adjustments */
[data-theme="light"] .phone-frame {
    background: #ffffff;
    border-color: #e5e7eb;
}

[data-theme="light"] .demo-loader {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .theme-toggle-icon {
        width: 20px;
        height: 20px;
    }
}
