/* assets/css/amazon-sidebar.css */

/* --- Amazon-style Sidebar Container --- */
.amazon-sidebar {
    position: fixed;
    top: 0;
    left: -380px; /* Initially hidden */
    width: 365px;
    height: 100%;
    background: var(--bg-tertiary);
    z-index: 1000001; /* Above everything including cursor */
    box-shadow: var(--shadow-md);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.amazon-sidebar.active {
    left: 0;
}

/* --- Overlay --- */
.amazon-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: none; /* Initially hidden */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.amazon-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* --- Sidebar Header --- */
.sidebar-header {
    background: #232f3e; /* Amazon dark blue/dark theme look */
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    position: relative;
    flex-shrink: 0;
}

.sidebar-header .user-icon {
    width: 30px;
    height: 30px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #232f3e;
}

.sidebar-close-btn {
    position: absolute;
    top: 15px;
    right: -50px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s, opacity 0.3s;
    opacity: 0;
    visibility: hidden;
}

.amazon-sidebar.active .sidebar-close-btn {
    opacity: 1;
    visibility: visible;
}

.sidebar-close-btn:hover {
    transform: scale(1.1);
}

/* --- Sidebar Content --- */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-section {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-secondary);
    margin-bottom: 15px;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section-title {
    padding: 0 30px 10px 30px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar-list-item a:hover {
    background: var(--bg-quaternary);
    color: var(--text-primary);
}

.sidebar-list-item a svg {
    color: #555555;
    transition: color 0.2s;
}

.sidebar-list-item a:hover svg {
    color: #ffffff;
}

/* --- Custom Scrollbar --- */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .amazon-sidebar {
        width: 300px;
        left: -320px;
    }
}
