/**
 * Sidebar Component Styles
 * App-specific sidebar styling for the hybrid layout
 * @version 1.0.0
 */

/* =============================================================================
   SIDEBAR APP VARIANTS
   ============================================================================= */

/* Coffee App Sidebar */
.app-coffee .hybrid-sidebar {
    --sidebar-accent: var(--coffee-primary, #6F4E37);
    --sidebar-accent-light: rgba(111, 78, 55, 0.1);
    --sidebar-bg: #FFFBF7;
    background-color: var(--sidebar-bg);
}

.app-coffee .sidebar-nav-item.active {
    background-color: var(--sidebar-accent-light);
    color: var(--sidebar-accent);
}

.app-coffee .sidebar-nav-item.active .sidebar-nav-item__icon {
    color: var(--sidebar-accent);
}

/* Tea App Sidebar */
.app-tea .hybrid-sidebar {
    --sidebar-accent: var(--tea-primary, #2D5016);
    --sidebar-accent-light: rgba(45, 80, 22, 0.1);
    --sidebar-bg: #F8FBF8;
    background-color: var(--sidebar-bg);
}

.app-tea .sidebar-nav-item.active {
    background-color: var(--sidebar-accent-light);
    color: var(--sidebar-accent);
}

.app-tea .sidebar-nav-item.active .sidebar-nav-item__icon {
    color: var(--sidebar-accent);
}

/* Sunlight App Sidebar */
.app-sunlight .hybrid-sidebar {
    --sidebar-accent: var(--sunlight-accent, #D97706);
    --sidebar-accent-light: rgba(217, 119, 6, 0.1);
    --sidebar-bg: #FFFDF7;
    background-color: var(--sidebar-bg);
}

.app-sunlight .sidebar-nav-item.active {
    background-color: var(--sidebar-accent-light);
    color: var(--sidebar-accent);
}

.app-sunlight .sidebar-nav-item.active .sidebar-nav-item__icon {
    color: var(--sidebar-accent);
}

/* =============================================================================
   SIDEBAR QUICK STATS WIDGET
   ============================================================================= */

.sidebar-stats {
    padding: 16px;
    margin: 12px 12px 0;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
}

.sidebar-stats__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sidebar-stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sidebar-stat {
    text-align: center;
}

.sidebar-stat__value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-stat__label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Coffee-specific stat styling */
.app-coffee .sidebar-stat__value {
    color: var(--coffee-primary);
}

/* Tea-specific stat styling */
.app-tea .sidebar-stat__value {
    color: var(--tea-primary);
}

/* Sunlight-specific stat styling */
.app-sunlight .sidebar-stat__value {
    color: var(--sunlight-accent);
}

/* =============================================================================
   SIDEBAR RECENT ITEMS
   ============================================================================= */

.sidebar-recent {
    padding: 0 12px;
    margin-top: 12px;
}

.sidebar-recent__title {
    padding: 8px 8px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.sidebar-recent__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-recent__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    transition: background-color 0.15s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.sidebar-recent__item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-recent__item-icon {
    font-size: 16px;
    opacity: 0.7;
}

.sidebar-recent__item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-recent__item-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* =============================================================================
   SIDEBAR STREAK/PROGRESS WIDGET
   ============================================================================= */

.sidebar-progress {
    padding: 16px;
    margin: 12px 12px 0;
    background: linear-gradient(135deg, var(--sidebar-accent-light), transparent);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.sidebar-progress__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sidebar-progress__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-progress__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--sidebar-accent);
}

.sidebar-progress__bar {
    height: 6px;
    background-color: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.sidebar-progress__fill {
    height: 100%;
    background-color: var(--sidebar-accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sidebar-progress__label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* =============================================================================
   SIDEBAR SHORTCUTS
   ============================================================================= */

.sidebar-shortcuts {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-shortcuts__title {
    padding: 4px 8px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.sidebar-shortcut {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    transition: background-color 0.15s ease;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.sidebar-shortcut:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-shortcut__icon {
    font-size: 16px;
}

.sidebar-shortcut__kbd {
    margin-left: auto;
    padding: 2px 6px;
    font-size: 10px;
    font-family: monospace;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
}

/* =============================================================================
   SIDEBAR APP SWITCHER
   ============================================================================= */

.sidebar-app-switcher {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-app-switcher__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 8px;
}

.sidebar-app-switcher__list {
    display: flex;
    gap: 6px;
}

.sidebar-app-switcher__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 10px;
    background-color: var(--bg-tertiary);
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.sidebar-app-switcher__item:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.sidebar-app-switcher__item.active {
    background-color: var(--sidebar-accent-light);
    border-color: var(--sidebar-accent);
    color: var(--sidebar-accent);
}

.sidebar-app-switcher__icon {
    font-size: 20px;
}

.sidebar-app-switcher__name {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* =============================================================================
   SIDEBAR DIVIDER
   ============================================================================= */

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 12px 16px;
}

/* =============================================================================
   SIDEBAR SCROLLBAR STYLING
   ============================================================================= */

.hybrid-sidebar::-webkit-scrollbar {
    width: 6px;
}

.hybrid-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.hybrid-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.hybrid-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* Firefox scrollbar */
.hybrid-sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* =============================================================================
   MOBILE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 767px) {
    .sidebar-stats__grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sidebar-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .sidebar-stat__value {
        font-size: 20px;
    }

    .sidebar-app-switcher__list {
        flex-wrap: wrap;
    }

    .sidebar-app-switcher__item {
        flex: 0 0 calc(33.333% - 4px);
    }
}
