/* Enhanced Theme Toggle System for BBF Website
 * Provides improved UI, smooth transitions, and accessibility
 */

/* Theme Toggle Button - iPhone Notch Style */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 0.6rem 1.2rem;
    margin-left: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow: hidden;
}

/* Theme Icon Styling */
.theme-toggle i {
    font-size: 1.1rem;
    color: var(--bbf-gold);
    margin-right: 8px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform: translateZ(0);
}

/* Theme Text Styling */
.theme-toggle span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Hover Effects */
.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(235, 181, 64, 0.3);
    background: rgba(0, 0, 0, 0.7);
}

/* Active/Pressed State */
.theme-toggle:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Light Mode Specific Styling */
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle span {
    color: var(--text-secondary);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(235, 181, 64, 0.4);
}

/* Theme Switch Animation */
.theme-toggle.switching i {
    transform: rotate(360deg) scale(1.2);
}

.theme-toggle.switching span {
    opacity: 0;
    transform: translateX(10px);
}

/* Accessibility Improvements */
.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(235, 181, 64, 0.5);
}

.theme-toggle:focus:not(:focus-visible) {
    box-shadow: none;
}

.theme-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(235, 181, 64, 0.5);
}

/* Theme Transition for Body */
body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 0.5rem 1rem;
        margin-left: 1rem;
    }
    
    .theme-toggle i {
        font-size: 1rem;
    }
    
    .theme-toggle span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        padding: 0.4rem 0.8rem;
        margin-left: 0.8rem;
    }
    
    .theme-toggle span {
        display: none;
    }
    
    .theme-toggle i {
        margin-right: 0;
    }
}
