/* Experts Page Specific Styles */

/* Page Header */
.experts-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.experts-page-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.experts-page-header-left p {
    color: var(--text-secondary);
    font-size: 14px;
}

.experts-page-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-new-consult {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-new-consult:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.consult-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 16px;
    width: 280px;
}

.consult-search i {
    color: var(--text-muted);
    font-size: 14px;
}

.consult-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-primary);
    background: transparent;
}

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

/* Expert AI Cards Row */
.ai-experts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ai-expert-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ai-expert-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ai-expert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    opacity: 0;
    transition: opacity 0.2s;
}

.ai-expert-card:hover::before {
    opacity: 1;
}

.ai-expert-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.ai-expert-icon.radiology {
    background: linear-gradient(135deg, rgba(0, 195, 209, 0.15), rgba(20, 83, 213, 0.15));
    color: var(--primary);
}

.ai-expert-icon.pathology {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(192, 132, 252, 0.1));
    color: #9333ea;
}

.ai-expert-icon.cardiology {
    background: var(--critical-light);
    color: var(--critical);
}

.ai-expert-icon.dermatology {
    background: var(--warning-light);
    color: var(--warning);
}

.ai-expert-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ai-expert-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.ai-expert-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.ai-expert-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 195, 209, 0.1), rgba(20, 83, 213, 0.1));
    color: var(--primary);
}

/* Two Column Layout */
.experts-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Active Consultations */
.consult-list {
    padding: 8px 24px 24px;
}

.consult-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.consult-item:last-child {
    margin-bottom: 0;
}

.consult-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.consult-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.consult-avatar.human {
    background: var(--bg-primary);
    overflow: hidden;
}

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

.consult-avatar.ai {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
}

.consult-info {
    flex: 1;
}

.consult-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.consult-expert-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.consult-time {
    font-size: 11px;
    color: var(--text-muted);
}

.consult-specialty {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.consult-question {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.consult-patient-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 6px;
}

.consult-patient-ref i {
    color: var(--primary);
}

.consult-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    align-self: flex-start;
}

.consult-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.consult-status.in-progress {
    background: var(--info-light);
    color: var(--info);
}

.consult-status.completed {
    background: var(--success-light);
    color: var(--success);
}

/* Expert Directory */
.directory-list {
    padding: 8px 24px 24px;
}

.directory-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.directory-item:last-child {
    margin-bottom: 0;
}

.directory-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.directory-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.directory-info {
    flex: 1;
}

.directory-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

.directory-stats {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.directory-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.directory-availability {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.directory-availability.online {
    color: var(--success);
}

.directory-availability.busy {
    color: var(--warning);
}

.directory-availability.offline {
    color: var(--text-muted);
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.availability-dot.online {
    background: var(--success);
}

.availability-dot.busy {
    background: var(--warning);
}

.availability-dot.offline {
    background: var(--text-muted);
}

.directory-consult-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    background: var(--bg-card);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.directory-consult-btn:hover {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    border-color: transparent;
}

/* Recent Consult Results */
.results-card {
    margin-bottom: 24px;
}

.results-list {
    padding: 8px 24px 24px;
}

.result-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.result-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-expert-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.result-expert-avatar.ai {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
}

.result-expert-avatar.human {
    border-radius: 50%;
    overflow: hidden;
}

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

.result-expert-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-expert-specialty {
    font-size: 12px;
    color: var(--text-muted);
}

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

.result-question {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 52px;
}

.result-answer {
    background: linear-gradient(135deg, rgba(0, 195, 209, 0.05), rgba(20, 83, 213, 0.05));
    border: 1px solid rgba(0, 195, 209, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-left: 52px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.result-answer p {
    margin: 0 0 8px 0;
}

.result-answer p:last-child {
    margin-bottom: 0;
}

.result-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-left: 52px;
}

.result-patient-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 6px;
}

.result-patient-ref i {
    color: var(--primary);
}

.result-action-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.result-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Consult Stats */
.consult-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.consult-stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.2s;
}

.consult-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.consult-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.consult-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

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

/* Responsive */
@media (max-width: 1400px) {
    .ai-experts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .experts-two-col {
        grid-template-columns: 1fr;
    }

    .consult-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .experts-page-header {
        flex-direction: column;
        gap: 16px;
    }

    .experts-page-header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .consult-search {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 768px) {
    .ai-experts-grid {
        grid-template-columns: 1fr;
    }

    .consult-stats-grid {
        grid-template-columns: 1fr;
    }

    .directory-item {
        flex-wrap: wrap;
    }

    .directory-stats {
        display: none;
    }

    .result-question,
    .result-answer,
    .result-footer {
        padding-left: 0;
        margin-left: 0;
    }
}
