/**
 * Public Sidebar Styles
 * For All Rooms, Newsfeed, and Friend Requests pages
 */

/* Layout with Sidebar */
.page-with-sidebar {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-main-content {
    flex: 1;
    min-width: 0;
    order: 2; /* Content goes to right */
}

.public-sidebar {
    width: 320px;
    flex-shrink: 0;
    order: 1; /* Sidebar goes to left */
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--card-background, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
    color: var(--text-primary, #1f2937);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget-title i {
    color: var(--primary-color, #3b82f6);
}

/* Navigation Menu */
.sidebar-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--card-background, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary, #1f2937);
    transition: all 0.3s ease;
}

.sidebar-nav-menu a:hover {
    background: #eff6ff;
    border-color: var(--primary-color, #3b82f6);
    transform: translateX(4px);
}

.sidebar-nav-menu li.active a {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: #1e40af;
    font-weight: 600;
}

.sidebar-nav-menu li.active a i,
.sidebar-nav-menu li.active a .badge {
    color: white;
}

.sidebar-nav-menu li.active a .badge {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.sidebar-nav-menu a i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav-menu .badge {
    background: var(--primary-color, #3b82f6);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.sidebar-nav-menu .badge-alert {
    background: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* User Stats */
.user-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-stats-list .stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
}

.user-stats-list .stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    color: var(--primary-color, #3b82f6);
    font-size: 1.25rem;
}

.user-stats-list .stat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-stats-list .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.user-stats-list .stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
}

/* Sidebar Buttons */
.sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
}

.sidebar-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-btn.btn-secondary {
    background: white;
    color: var(--primary-color, #3b82f6);
    border: 2px solid var(--primary-color, #3b82f6);
}

/* Login CTA */
.sidebar-login-cta {
    text-align: center;
}

.login-cta-content .cta-icon {
    font-size: 3rem;
    color: var(--primary-color, #3b82f6);
    margin-bottom: 1rem;
}

.login-cta-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Rooms List */
.sidebar-rooms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-rooms-list .room-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
}

.sidebar-rooms-list .room-info {
    flex: 1;
}

.sidebar-rooms-list .room-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.sidebar-rooms-list .room-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
}

.room-join-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #3b82f6);
    color: white;
    border-radius: 50%;
    text-decoration: none;
}

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

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
}

.activity-icon i {
    font-size: 1.125rem;
}

.activity-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.no-data {
    text-align: center;
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    padding: 1rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .page-with-sidebar {
        flex-direction: column;
    }
    
    .public-sidebar {
        width: 100%;
        order: 1; /* Sidebar stays on top on mobile */
    }
    
    .page-main-content {
        order: 2; /* Content below sidebar on mobile */
    }
}

@media (max-width: 767px) {
    .public-sidebar {
        display: none;
    }
    
    .sidebar-toggle-btn {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: var(--primary-color, #3b82f6);
        color: white;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }
    
    .public-sidebar.mobile-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--background-color, #fff);
        z-index: 1000;
        overflow-y: auto;
        padding: 1rem;
    }
}
