/**
 * Lunarcat Light/Dark Toggle Component
 *
 * Styles specific to the theme toggle button
 * Core theme variables are defined in lunarcat_global.css
 */

/* === THEME TOGGLE BUTTON === */
.global-theme-toggle {
    position: fixed;
    top: 180px;
    right: 20px;
    z-index: 9999;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Solid background with gradient */
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 50%, #d8d8d8 100%);
    border: 2px solid #d1d5db;
    /* Cat icon style glow effect */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 20px rgba(248, 248, 248, 0.5);
}

/* Dark mode toggle styling */
[data-theme="dark"] .global-theme-toggle {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    border: 2px solid #333;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 205, 57, 0.3);
}

.global-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(248, 248, 248, 0.7);
}

[data-theme="dark"] .global-theme-toggle:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 205, 57, 0.5);
}

.global-theme-toggle .theme-icon {
    font-size: 24px;
    transition: opacity 0.3s ease;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #4a5568;
}

/* Dark mode icon colors */
[data-theme="dark"] .global-theme-toggle .theme-icon {
    color: #ffcd39;
}

.global-theme-toggle .light-icon {
    opacity: 1;
}

.global-theme-toggle .dark-icon {
    opacity: 0;
}

/* Dark mode icon visibility */
[data-theme="dark"] .global-theme-toggle .light-icon {
    opacity: 0;
}

[data-theme="dark"] .global-theme-toggle .dark-icon {
    opacity: 1;
}

/* === RESPONSIVE ADJUSTMENTS === */
/* Page-anchored (scrolls away like a header control) instead of a fixed
   circle floating over full-bleed content. Offsets follow the header
   snippet's geometry (docs/reference/snippets/snippet-lunarcat-header.php):
   120px-tall header with right-aligned nav links above 600px, 100px-tall
   header with a top-right hamburger at 600px and below. */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    /* Just below the header, in the 40px gap above .site-content */
    .global-theme-toggle {
        position: absolute;
        top: 124px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .global-theme-toggle .theme-icon {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    /* In the header row, left of the hamburger button */
    .global-theme-toggle {
        top: 30px;
        right: 70px;
    }
}