/* ========================================
   Global Patient Chip (워크샵용 EMR)
   ======================================== */

.patient-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px solid #dee2e6;
    margin-left: 16px;
    transition: all 0.2s ease;
}

.patient-banner.no-patient {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border-color: #ffc107;
}

.patient-banner.no-patient .patient-name {
    color: #856404;
    font-weight: 500;
}

/* 로딩 상태 칩 */
.patient-banner.loading-state {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
}

.patient-banner.loading-state .patient-status-chip {
    color: #0d47a1;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.patient-chip-icon.loading {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

/* 환자 아이콘 */
.patient-chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0066cc 0%, #004a99 100%);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.3);
}

.patient-chip-icon.no-patient {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #fff;
}

/* 환자 정보 그룹 */
.patient-chip-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 환자명 + 나이/성별 */
.patient-name {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 6px;
}

.patient-meta {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

/* 환자번호 */
.patient-id {
    font-size: 11px;
    color: #6c757d;
    font-family: 'IBM Plex Mono', monospace;
}

/* 진단명 */
.patient-diagnosis {
    font-size: 12px;
    color: #495057;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-diagnosis strong {
    font-weight: 600;
    color: #212529;
}

/* undefined 처리 */
.field-undefined {
    color: #adb5bd;
    font-style: italic;
}

.field-undefined::before {
    content: '—';
}

/* Tooltip for undefined */
.field-undefined:hover::after {
    content: '미기입';
    position: absolute;
    background: #343a40;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-left: 8px;
    margin-top: -8px;
    z-index: 1000;
}

/* 반응형 */
@media (max-width: 1400px) {
    .patient-diagnosis {
        max-width: 300px;
    }
}

@media (max-width: 1200px) {
    .patient-banner {
        gap: 8px;
        padding: 6px 12px;
    }
    
    .patient-chip-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .patient-name {
        font-size: 14px;
    }
    
    .patient-diagnosis {
        max-width: 200px;
    }
}
