/* Theme Toggle Button Styles */

.theme-toggle-btn {
    /* Base styles */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 2px solid var(--theme-border-primary);
    background: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.125rem;
    line-height: 1;
    
    /* Hover effects */
    &:hover {
        background: var(--theme-bg-accent);
        border-color: var(--theme-border-accent);
        transform: translateY(-1px);
        box-shadow: var(--theme-shadow-md);
    }
    
    /* Active state */
    &:active {
        transform: translateY(0);
        box-shadow: var(--theme-shadow-sm);
    }
    
    /* Focus state */
    &:focus {
        outline: none;
        ring: 2px;
        ring-color: var(--theme-border-accent);
        ring-offset: 2px;
        ring-offset-color: var(--theme-bg-primary);
    }
    
    /* Disabled state */
    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }
}

/* Theme toggle in navigation */
nav .theme-toggle-btn {
    margin-right: 0.5rem;
}

/* Theme toggle in header */
header .theme-toggle-btn {
    margin-left: 0.5rem;
}

/* Theme toggle animations */
.theme-toggle-btn {
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.theme-toggle-btn:hover::before {
    left: 100%;
}

/* Theme toggle icon animations */
.theme-toggle-btn:hover {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Theme toggle tooltip */
.theme-toggle-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--theme-bg-primary);
    color: var(--theme-text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--theme-border-primary);
    box-shadow: var(--theme-shadow-lg);
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

/* Theme toggle in different contexts */
.theme-toggle-btn.theme-toggle-compact {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
}

.theme-toggle-btn.theme-toggle-large {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

/* Theme toggle with text */
.theme-toggle-btn.theme-toggle-with-text {
    width: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}

.theme-toggle-btn.theme-toggle-with-text::after {
    content: attr(data-text);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Theme toggle states */
.theme-toggle-btn[data-theme="light"] {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #ffffff;
}

.theme-toggle-btn[data-theme="dark"] {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: #ffffff;
}

.theme-toggle-btn[data-theme="high-contrast"] {
    background: linear-gradient(135deg, #000080 0%, #0000ff 100%);
    color: #ffffff;
}

.theme-toggle-btn[data-theme="auto"] {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
}

/* Responsive theme toggle */
@media (max-width: 640px) {
    .theme-toggle-btn {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .theme-toggle-btn.theme-toggle-with-text {
        padding: 0.375rem 0.5rem;
    }
}

/* High contrast mode adjustments */
[data-theme="high-contrast"] .theme-toggle-btn {
    border-width: 3px;
    border-color: var(--theme-border-primary);
}

[data-theme="high-contrast"] .theme-toggle-btn:hover {
    border-color: var(--theme-border-accent);
    box-shadow: 0 0 0 3px var(--theme-border-accent);
}

/* Dark theme adjustments */
[data-theme="dark"] .theme-toggle-btn {
    border-color: var(--theme-border-secondary);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: var(--theme-bg-accent);
    border-color: var(--theme-border-accent);
}

/* Light theme adjustments */
[data-theme="light"] .theme-toggle-btn {
    border-color: var(--theme-border-secondary);
}

[data-theme="light"] .theme-toggle-btn:hover {
    background: var(--theme-bg-accent);
    border-color: var(--theme-border-accent);
}

/* Sidebar Theme Option Buttons */
.theme-option-btn {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: transparent;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    text-align: left;
}

.theme-option-btn:hover {
    background-color: rgba(13, 148, 136, 0.1);
    border-color: #0d9488;
    transform: translateX(2px);
}

.theme-option-btn.active {
    background-color: rgba(13, 148, 136, 0.2);
    border-color: #0d9488;
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.3);
}

.theme-option-btn.active .theme-check {
    display: block !important;
}

.theme-check {
    display: none;
}

/* User Profile Section Styles */
#sidebar .mt-8 {
    margin-top: 2rem;
}

#sidebar .pt-6 {
    padding-top: 1.5rem;
}

#sidebar .border-t {
    border-top: 1px solid #374151;
}

#sidebar h3 {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

#sidebar h4 {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* User Info Card */
#sidebar .bg-gray-700 {
    background-color: #374151;
}

#sidebar .bg-teal-500 {
    background-color: #14b8a6;
}

#sidebar .text-white {
    color: #ffffff;
}

#sidebar .text-gray-400 {
    color: #9ca3af;
}

#sidebar .text-gray-300 {
    color: #d1d5db;
}

/* Theme Option Buttons */
#sidebar .theme-option-btn {
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

#sidebar .theme-option-btn:hover {
    border-color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.1);
}

#sidebar .theme-option-btn.active {
    border-color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.2);
}

/* Quick Action Buttons */
#sidebar .text-gray-400 {
    color: #9ca3af;
}

#sidebar .hover\:text-white:hover {
    color: #ffffff;
}

#sidebar .hover\:bg-gray-700:hover {
    background-color: #374151;
}

#sidebar .text-red-400 {
    color: #f87171;
}

#sidebar .hover\:text-red-300:hover {
    color: #fca5a5;
}

#sidebar .hover\:bg-red-900:hover {
    background-color: #7f1d1d;
}

#sidebar .hover\:bg-opacity-20:hover {
    background-opacity: 0.2;
}

/* Responsive adjustments for sidebar */
@media (max-width: 768px) {
    #sidebar .w-64 {
        width: 16rem;
    }
    
    #sidebar .p-4 {
        padding: 1rem;
    }
    
    #sidebar .space-y-2 > * + * {
        margin-top: 0.5rem;
    }
    
    #sidebar .space-y-3 > * + * {
        margin-top: 0.75rem;
    }
}

/* Theme option button focus states */
.theme-option-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.5);
}

/* Theme option button active states */
.theme-option-btn:active {
    transform: scale(0.98);
}

/* Theme check icon animation */
.theme-check {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced sidebar styling */
#sidebar {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

#sidebar .bg-gray-800 {
    background: transparent;
}

/* User profile section enhancements */
#sidebar .mt-8.pt-6.border-t {
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.8) 100%);
    margin: 2rem -1rem 0 -1rem;
    padding: 1.5rem 1rem 0 1rem;
    border-top: 1px solid rgba(55, 65, 81, 0.8);
}

/* Theme option button enhancements */
.theme-option-btn {
    position: relative;
    overflow: hidden;
}

.theme-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.1), transparent);
    transition: left 0.3s ease;
}

.theme-option-btn:hover::before {
    left: 100%;
}

/* Active theme button glow effect */
.theme-option-btn.active {
    box-shadow: 0 0 0 1px #14b8a6, 0 0 10px rgba(20, 184, 166, 0.3);
}

/* User info card enhancements */
#sidebar .bg-gray-700 {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border: 1px solid rgba(75, 85, 99, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Quick action button enhancements */
#sidebar button, #sidebar a {
    position: relative;
    overflow: hidden;
}

#sidebar button::before, #sidebar a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s ease;
}

#sidebar button:hover::before, #sidebar a:hover::before {
    left: 100%;
}

/* Profile Theme Selection Buttons */
.theme-option-btn-profile {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: transparent;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    text-align: left;
    outline: none;
}

.theme-option-btn-profile:hover {
    background-color: rgba(13, 148, 136, 0.05);
    border-color: #0d9488;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.theme-option-btn-profile:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.theme-option-btn-profile.border-teal-500 {
    background-color: rgba(13, 148, 136, 0.05);
    border-color: #0d9488;
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
}

.theme-option-btn-profile.bg-teal-50 {
    background-color: #f0fdfa;
}

.theme-check-profile {
    display: none;
    color: #0d9488;
}

.theme-option-btn-profile.border-teal-500 .theme-check-profile {
    display: block;
}

/* Profile Page Specific Styles */
#user-profile {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Header Back Button */
#profile-back-btn {
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

#profile-back-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

/* Profile Content Grid Responsiveness */
@media (max-width: 1024px) {
    .grid-cols-1.lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .lg\:col-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .grid-cols-1.sm\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}
