/**
 * Feed Groups Styling
 *
 * Additional styles for feed groups feature
 */

/* Sidebar Section */
.sidebar-section {
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin-top: 1rem;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;  /* Take remaining space after feeds list */
    min-height: 0;  /* Allow flex shrink */
    overflow: hidden;  /* Prevent section scroll, only groups-list scrolls */
}

.sidebar-section #groups-list {
    flex: 1;  /* Take available space within section */
    overflow-y: auto;  /* Scroll independently */
    min-height: 0;  /* Allow flex shrink */
}

.sidebar-section .sidebar-header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-section .sidebar-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Group Info Card */
.group-info-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

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

.group-stat .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.group-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.group-stat .stat-value.duplicate-badge {
    color: var(--warning, #f59e0b);
}

/* Feed Selection Checkboxes */
.feed-selection {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.feed-selection .checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.feed-selection .checkbox-label:hover {
    background-color: var(--hover-bg, #f3f4f6);
}

.feed-selection .checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.feed-selection .empty-message {
    text-align: center;
    color: var(--text-secondary, #6b7280);
    padding: 2rem;
    font-size: 0.875rem;
}

/* Group Item in Sidebar */
.sidebar-item .sidebar-icon {
    font-size: 1.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .group-info-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }

    .group-stat .stat-value {
        font-size: 1.25rem;
    }

    /* Feed selection checkboxes - Better touch targets */
    .feed-selection .checkbox-label {
        padding: 0.75rem;
    }

    .feed-selection .checkbox-label input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Sidebar items - Larger touch targets */
    .sidebar-item {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .group-info-card {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .group-stat .stat-value {
        font-size: 1.125rem;
    }

    .group-stat .stat-label {
        font-size: 0.625rem;
    }

    .sidebar-section .sidebar-header h3 {
        font-size: 0.75rem;
    }

    .feed-selection {
        max-height: 250px;
    }

    .feed-selection .checkbox-label {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .group-info-card {
    background: var(--surface-dark, #1f2937);
    border-color: var(--border-dark, #374151);
}

[data-theme="dark"] .group-stat .stat-label {
    color: var(--text-secondary-dark, #9ca3af);
}

[data-theme="dark"] .group-stat .stat-value {
    color: var(--text-primary-dark, #f9fafb);
}

[data-theme="dark"] .feed-selection {
    border-color: var(--border-dark, #374151);
    background: var(--surface-dark, #1f2937);
}

[data-theme="dark"] .feed-selection .checkbox-label:hover {
    background-color: var(--hover-bg-dark, #374151);
}
