/* ======================================== */
/* ENHANCED SCROLLBAR STYLING */
/* ======================================== */

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: var(--space-md) 0;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    width: 10px;
}

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

/* Modal content scrollbar */
.modal-content::-webkit-scrollbar,
.info-content::-webkit-scrollbar,
.emotions-guide-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track,
.info-content::-webkit-scrollbar-track,
.emotions-guide-content::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 4px;
    margin: var(--space-sm) 0;
}

.modal-content::-webkit-scrollbar-thumb,
.info-content::-webkit-scrollbar-thumb,
.emotions-guide-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.modal-content::-webkit-scrollbar-thumb:hover,
.info-content::-webkit-scrollbar-thumb:hover,
.emotions-guide-content::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-primary);
    box-shadow: 0 0 6px rgba(33, 128, 141, 0.5);
}

/* Firefox scrollbar for modal content */
.modal-content,
.info-content,
.emotions-guide-content {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-bg);
}

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

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

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

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* General scrollbar for any scrollable element */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox general scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-bg);
}

/* ======================================== */
/* RESPONSIVE - SCROLLBAR */
/* ======================================== */
@media (max-width: 768px) {
    .sidebar::-webkit-scrollbar,
    .modal-content::-webkit-scrollbar,
    .info-content::-webkit-scrollbar {
        width: 6px;
    }
    
    *::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {
    .sidebar::-webkit-scrollbar,
    .modal-content::-webkit-scrollbar,
    .info-content::-webkit-scrollbar {
        width: 4px;
    }
    
    *::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}

/* Hide scrollbar on touch devices but keep functionality */
@media (hover: none) and (pointer: coarse) {
    .sidebar::-webkit-scrollbar,
    .modal-content::-webkit-scrollbar,
    .info-content::-webkit-scrollbar {
        width: 4px;
    }
    
    .sidebar::-webkit-scrollbar-thumb,
    .modal-content::-webkit-scrollbar-thumb,
    .info-content::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *::-webkit-scrollbar-thumb {
        transition: none !important;
    }
}
