/* ===================================
   Professional Dark Mode Toggle Styles
   =================================== */

/* Container positioning */
.theme-toggle-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.theme-toggle-container:hover {
    opacity: 1;
}

/* Toggle button */
.theme-toggle-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.12);
}

.theme-toggle-btn:active {
    transform: translateY(0);
}

/* Icon styling */
.theme-icon {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #01162b;
}

/* Sun icon - visible in light mode */
.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Moon icon - hidden in light mode */
.moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Dark mode active state */
[data-theme="dark"] .theme-toggle-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .theme-icon {
    color: #cbd5e1;
}

/* Icon transitions for dark mode */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Smooth theme transitions */
:root {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Focus state for accessibility */
.theme-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .theme-toggle-btn:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

/* Ripple effect on click */
.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

[data-theme="dark"] .theme-toggle-btn::before {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle-btn:active::before {
    width: 44px;
    height: 44px;
    transition: 0s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-toggle-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .theme-toggle-btn {
        width: 40px;
        height: 40px;
    }
    
    .theme-icon {
        width: 18px;
        height: 18px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .theme-toggle-btn,
    .theme-icon,
    :root,
    body {
        transition: none !important;
    }
}
