/* /ui/static/css/theme-switcher.css — compact sun/moon toggle button */
.theme-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 50%;
    background-color: var(--bg-button);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.5s ease, background-color 0.5s ease, color 0.5s ease, transform 0.5s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    border-color: #7eb980;
}

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

.theme-toggle-btn .icon {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.5s ease;
}

/* Sun icon (visible in light mode) */
.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    fill: #fbbf24;
    stroke: #fbbf24;
    transition: transform 0.6s, opacity 0.5s, fill 0.25s, stroke 0.25s;
}

/* Moon icon (hidden by default) */
.moon-icon {
    opacity: 0;
    transform: rotate(120deg) scale(0.7);
    fill: #fbbf24;
}

/* Dark mode: hide sun, show moon with correct crescent orientation */
.dark .theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: rotate(-120deg) scale(0.7);
}

.dark .theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: rotate(-100deg) scale(1); /* perfect crescent moon orientation */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .theme-switcher {
        top: 12px;
        right: 12px;
    }
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }
    .theme-toggle-btn .icon {
        width: 20px;
        height: 20px;
    }
}