/* theme-switcher.css - Стили для переключателя тем */

.theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 6px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Основной переключатель */
.theme-toggle {
    width: 60px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

body.light-theme .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    z-index: 1;
}

body.light-theme .theme-toggle::before {
    left: calc(100% - 27px);
    background: #333333;
}

/* Иконки внутри переключателя */
.toggle-icon {
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 2;
}

.toggle-icon.moon {
    color: rgba(255, 255, 255, 0.7);
}

.toggle-icon.sun {
    color: rgba(255, 255, 255, 0.7);
}

body.light-theme .toggle-icon.moon {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .toggle-icon.sun {
    color: #f39c12;
}

/* Подсказка - ВСЕГДА ВИДНА */
.theme-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 12px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

body.light-theme .theme-label {
    color: rgba(0, 0, 0, 0.7);
    background: rgba(255, 255, 255, 0.9);
}

/* Убрал ховер эффект для надписи, так как она всегда видна */
/* .theme-switcher:hover .theme-label {
    opacity: 1;
    transform: translateY(0);
} */

/* Адаптивность */
@media (max-width: 768px) {
    .theme-switcher {
        bottom: 20px;
        right: 20px;
    }
    
    .theme-toggle {
        width: 50px;
        height: 26px;
    }
    
    .theme-toggle::before {
        width: 20px;
        height: 20px;
    }
    
    body.light-theme .theme-toggle::before {
        left: calc(100% - 23px);
    }
    
    .theme-label {
        font-size: 11px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .theme-switcher {
        bottom: 15px;
        right: 15px;
    }
    
    .theme-toggle {
        width: 46px;
        height: 24px;
    }
    
    .theme-toggle::before {
        width: 18px;
        height: 18px;
    }
    
    body.light-theme .theme-toggle::before {
        left: calc(100% - 21px);
    }
}

/* Анимация переключения */
@keyframes switchOn {
    0% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

.theme-toggle.active::before {
    animation: switchOn 0.3s ease;
}

/* Эффект при наведении */
.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.light-theme .theme-toggle:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Для поддержки prefers-color-scheme */
@media (prefers-color-scheme: light) {
    body:not(.light-theme):not(.dark-theme) .theme-toggle::before {
        left: calc(100% - 27px);
        background: #333333;
    }
    
    body:not(.light-theme):not(.dark-theme) .toggle-icon.moon {
        color: rgba(0, 0, 0, 0.4);
    }
    
    body:not(.light-theme):not(.dark-theme) .toggle-icon.sun {
        color: #f39c12;
    }
}