/**
 * staff_search.css - All Styles for Staff Search Interface
 */
/*tabs start here*/
.org-tabs {
            display: flex;
            gap: 0.5rem;
            border-bottom: 2px solid var(--border);
            margin-bottom: 2rem;
            background: white;
            padding: 1rem 1rem 0 1rem;
            border-radius: 8px 8px 0 0;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .tab-btn {
            padding: 0.75rem 1.5rem;
            border: none;
            background: transparent;
            color: #64748b;
            font-weight: 600;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
            font-size: 0.95rem;
            position: relative;
            bottom: -2px; /* Aligns with the container border */
        }

        .tab-btn:hover {
            color: var(--primary);
            background-color: #f1f5f9;
        }

        /* Active State for the Button */
        .tab-btn.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            background-color: #eff6ff;
        }

        /* --- Content Sections --- */
        .tab-content-wrapper {
            background: white;
            padding: 2rem;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            min-height: 400px;
        }

        /* 
           CRITICAL FIX: 
           We use a specific class 'tab-content' for the sections to be hidden/shown.
           We do NOT reuse 'tab-section' here to avoid CSS conflicts.
        */
        .tab-content {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Visual placeholders for the PHP includes */
        .placeholder-box {
            border: 2px dashed #cbd5e1;
            padding: 3rem;
            text-align: center;
            color: #64748b;
            border-radius: 8px;
            background: #f8fafc;
        }
        /*Tabs end here*/
/* ========== LAYOUT ========== */

.search-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== LEFT PANEL: SEARCH ========== */

.search-panel {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
}

.search-header {
    margin-bottom: 1rem;
}

.search-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.search-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== AUTOCOMPLETE ========== */

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Dropdown Results */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.autocomplete-results.active {
    display: block;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

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

.result-item:hover,
.result-item.selected {
    background-color: #eff6ff;
}

.result-item.selected {
    border-left: 3px solid var(--primary);
}

.result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    overflow: hidden;
    flex-shrink: 0;
}

.result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.result-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-name .highlight {
    color: var(--primary);
    font-weight: 700;
}

.result-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========== RIGHT PANEL: PROFILE ========== */

.profile-panel {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 500px;
    position: relative;
}

/* Empty State */

.profile-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: var(--text-muted);
    text-align: center;
}

.profile-empty-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-empty h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-main);
}

.profile-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* Profile Content */

.profile-content {
    display: none;
}

.profile-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.profile-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.profile-title h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background-color: #dbeafe;
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Profile Grid */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-block {
    padding: 1rem;
    background: var(--bg-gray);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Bio Section */

.bio-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.bio-text {
    line-height: 1.6;
    color: #374151;
}

/* ========== UTILITIES ========== */

.hidden { 
    display: none !important; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 968px) {
    .search-container {
        grid-template-columns: 1fr;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

