/* MIT-Harvard Network Visualization - Component Styles */

/* Filter Sections */
.filter-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

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

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.filter-header .filter-label {
    margin-bottom: 0;
}

/* Search */
.search-container {
    position: relative;
}

#search-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
}

#search-input::placeholder {
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.visible {
    display: block;
}

.search-result {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background: var(--bg-tertiary);
}

.search-result-name {
    font-size: 13px;
    font-weight: 500;
}

.search-result-dept {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 12px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* Checkbox List */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-list.scrollable {
    max-height: 160px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-box {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.checkbox-item input:checked + .checkbox-box {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-item input:checked + .checkbox-box::after {
    content: '✓';
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.checkbox-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkbox-count {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Range Slider */
input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Detail Panel */
.detail-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.detail-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
}

.detail-header {
    margin-bottom: 20px;
}

.detail-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.detail-badge-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-info {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-info strong {
    color: var(--text-primary);
}

.detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-stat {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 8px;
}

.detail-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Collaborators List */
.collaborator-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collaborator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.collaborator-item:hover {
    background: var(--border);
}

.collaborator-name {
    font-size: 13px;
    font-weight: 500;
}

.collaborator-weight {
    font-size: 12px;
    color: var(--text-muted);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.overflow-hidden {
    overflow: hidden;
}
