/* Sidebar Base Styles */
:root {
    --sidebar-width: 320px;
    --sidebar-mobile-width: 280px;
    --header-height: 60px;
    --footer-height: 30px;
}

.sidebar-left {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: var(--footer-height);
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .sidebar-left {
    background: rgba(28, 28, 30, 0.85);
    border-right-color: rgba(255, 255, 255, 0.1);
}

.sidebar-left.active {
    transform: translateX(0);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    left: 10px;
    top: 70px;
    z-index: 1001;
    width: 36px;
    height: 36px;
    background: var(--apple-gray);
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--apple-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--apple-text);
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--apple-shadow);
    background: var(--apple-blue);
    color: white;
}

.sidebar-left.active + .sidebar-toggle {
    left: calc(var(--sidebar-width) + 10px);
}

/* Sidebar Content */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Tabs */
.sidebar-tabs {
    display: flex;
    background: transparent;
    padding: 12px 12px 0;
    gap: 8px;
    flex-shrink: 0;
}

.tab-button {
    flex: 1;
    padding: 10px 4px;
    background: transparent;
    border: none;
    color: var(--apple-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    opacity: 0.7;
}

.tab-button i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.tab-button span {
    font-size: 0.8rem;
    font-weight: 500;
}

.tab-button:hover {
    opacity: 1;
    background: rgba(0, 122, 255, 0.1);
}

.tab-button.active {
    background: var(--apple-blue);
    color: white;
    opacity: 1;
}

.tab-button:hover i {
    transform: scale(1.1);
}

.tab-content {
    display: none;
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.tab-content.active {
    display: block;
}

/* Custom scrollbar styles */
.tab-content::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Climate Indicators Styles */
.climate-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding: 0 0.5rem;
    color: var(--text-color);
}

.climate-list {
    padding: 0 0.5rem;
}

.climate-category {
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.climate-indicator {
    background: var(--bg-color);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.625rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.climate-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.climate-indicator:active {
    transform: translateY(0);
}

.indicator-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.indicator-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 166, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.indicator-icon i {
    font-size: 1rem;
    color: var(--primary-color);
}

.climate-indicator:hover .indicator-icon {
    background: var(--primary-color);
}

.climate-indicator:hover .indicator-icon i {
    color: white;
}

.indicator-info {
    flex: 1;
}

.indicator-info h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.3px;
}

.indicator-importance {
    font-size: 0.625rem;
    color: #f59e0b;
    margin-top: 0.125rem;
    letter-spacing: 1px;
}

.indicator-arrow {
    color: var(--text-color);
    opacity: 0.5;
    transition: all 0.2s ease;
}

.climate-indicator:hover .indicator-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: var(--primary-color);
}

[data-theme="dark"] .climate-indicator {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .climate-indicator:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .indicator-icon {
    background: rgba(0, 166, 80, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar-left {
        width: var(--sidebar-mobile-width);
    }
    
    .sidebar-left.active + .sidebar-toggle {
        left: calc(var(--sidebar-mobile-width) + 10px);
    }
    
    .tab-button {
        padding: 8px 4px;
    }
    
    .tab-button i {
        font-size: 1rem;
    }
    
    .tab-button span {
        font-size: 0.7rem;
    }
}