/* =============================================================================
   PEPTIDE LINKS - Researcher Directory Styles
   Compact Card Grid Layout
   ============================================================================= */

/* Page Header */
.peptide-links-header {
    margin-bottom: 1.5rem;
}

.peptide-links-header .intro-columns {
    margin-top: 1rem;
}

.peptide-links-header .intro-columns p {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* =============================================================================
   FILTER SIDEBAR
   ============================================================================= */

.filter-sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    position: sticky;
    top: 80px;
}

.filter-section {
    margin-bottom: 1.25rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--aps-blue);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    font-size: 0.9rem;
}

/* Search Form */
.search-form .form-control {
    font-size: 0.9rem;
}

.search-form .btn {
    padding: 0.375rem 0.75rem;
}

/* State Filter (Browse by State) */
.state-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
    font-weight: 700;
    text-decoration: none;
    color: #495057;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.state-btn:hover {
    background: #e9ecef;
    color: var(--aps-blue);
    text-decoration: none;
}

.state-btn.active {
    background: var(--aps-blue);
    border-color: var(--aps-blue);
    color: white;
}

/* =============================================================================
   RESULTS
   ============================================================================= */

.results-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.results-count {
    font-size: 0.95rem;
    color: #666;
}

/* =============================================================================
   RESEARCHER GRID - Compact Cards
   ============================================================================= */

.researcher-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .researcher-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .researcher-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .researcher-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Compact Card */
.researcher-card {
    padding: 0.875rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.researcher-card:hover {
    border-color: #ced4da;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Researcher Name - Static (no links) */
.researcher-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--aps-blue);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

/* Researcher Name - Dropdown Button */
.researcher-name-btn {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--aps-blue);
    background: none;
    border: 1px solid var(--aps-blue);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.researcher-name-btn:hover,
.researcher-name-btn:focus {
    color: white;
    background-color: var(--aps-blue);
    text-decoration: none;
}

/* Hide default dropdown caret, use subtle indicator */
.researcher-name-btn::after {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.7rem;
    opacity: 0.5;
    vertical-align: middle;
}

.researcher-name-btn:hover::after {
    opacity: 0.8;
}

/* Dropdown Menu Styling */
.researcher-dropdown {
    font-size: 0.9rem;
    min-width: 160px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
}

.researcher-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    color: #333;
}

.researcher-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--aps-blue);
}

.researcher-dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

/* Icon colors in dropdown */
.text-orcid { color: #a6ce39; }
.text-pubmed { color: #20598e; }
.text-scholar { color: #4285f4; }

/* Institution */
.researcher-institution {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 0;
    flex-grow: 1;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================================================
   MOBILE STYLES
   ============================================================================= */

@media (max-width: 991.98px) {
    .filter-sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }

    .state-filter {
        max-height: 100px;
        overflow-y: auto;
    }
}

@media (max-width: 575.98px) {
    .researcher-grid {
        grid-template-columns: 1fr;
    }

    .researcher-card {
        padding: 0.75rem;
    }

    .researcher-name,
    .researcher-name-btn {
        font-size: 0.95rem;
    }

    .researcher-institution {
        -webkit-line-clamp: 1;
    }
}
