/* Community-specific sidebar styles */

.sidebar {
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border-right: 1px solid #e8edf3;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

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

.sidebar::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

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

.logo {
    padding: 25px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.sidebar nav {
    flex: 1;
    padding: 15px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: #556070;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f8fafc;
    color: #1f2937;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.12) 0%, rgba(168, 85, 247, 0.03) 100%);
    border-left-color: #a855f7;
    color: #7c3aed;
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.nav-section-title {
    padding: 15px 20px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #98a2b3;
    letter-spacing: 0.12em;
}

.communities-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.communities-list::-webkit-scrollbar {
    width: 6px;
}

.communities-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.communities-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.communities-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.community-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.community-item:hover {
    background: #f8fafc;
}

.community-item.active {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.1) 0%, rgba(168, 85, 247, 0.02) 100%);
    border-left-color: #a855f7;
}

.community-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.community-info {
    flex: 1;
    min-width: 0;
}

.community-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.community-members {
    font-size: 11px;
    color: #999;
}

.loading-communities,
.empty-communities {
    padding: 15px 20px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.loading-communities i {
    margin-right: 8px;
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid #eef2f7;
    background: linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
}

.user-level-badge {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    color: #4c1d95;
    text-align: center;
    gap: 12px;
}

.level-info,
.points-info {
    flex: 1;
}

.level-number,
.points-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.level-label,
.points-label {
    font-size: 10px;
    color: #7c3aed;
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-next-action {
    margin-top: 16px;
    background: #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 16px;
    padding: 14px;
    color: #4c1d95;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
}

.sidebar-next-action-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7c3aed;
    opacity: 1;
    margin-bottom: 4px;
}

.sidebar-next-action-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.sidebar-next-action-copy {
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-280px);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

/* Main content adjustment when sidebar is present */
body {
    margin-left: 280px;
}

@media (max-width: 1200px) {
    body {
        margin-left: 0;
    }
}
