/* Health Score Section Styles */

/* Grid for health cards */
.health-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Individual health card */
.health-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.health-card:hover {
    border-color: var(--primary-color, #6D28D9);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.1);
}

.health-card.selected {
    border-color: var(--primary-color, #6D28D9);
    background: var(--primary-light, #f5f3ff);
}

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

.health-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.health-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color, #6D28D9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.health-meta {
    display: flex;
    flex-direction: column;
}

.health-name {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    font-size: 14px;
}

.health-phone {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

/* Health score badge */
.health-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 70px;
}

.health-score-badge .score-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.health-score-badge .score-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 2px;
}

.health-score-badge.green {
    background: #dcfce7;
    color: #166534;
}

.health-score-badge.yellow {
    background: #fef9c3;
    color: #854d0e;
}

.health-score-badge.orange {
    background: #ffedd5;
    color: #c2410c;
}

.health-score-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

/* Health stats row */
.health-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.health-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

.health-stat i {
    width: 14px;
    height: 14px;
}

.health-stat.warmup {
    color: #f59e0b;
}

/* Progress bar */
.health-progress-bar {
    height: 4px;
    background: var(--border-color, #e5e7eb);
    border-radius: 2px;
    overflow: hidden;
}

.health-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.health-progress-fill.green { background: #22c55e; }
.health-progress-fill.yellow { background: #eab308; }
.health-progress-fill.orange { background: #f97316; }
.health-progress-fill.red { background: #ef4444; }

/* Details panel */
#health-details-panel {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.health-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.health-details-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

/* Circular score chart */
.health-score-large {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circular-chart {
    width: 80px;
    height: 80px;
}

.circle-bg {
    fill: none;
    stroke: var(--border-color, #e5e7eb);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.5s ease;
}

.circle.green { stroke: #22c55e; }
.circle.yellow { stroke: #eab308; }
.circle.orange { stroke: #f97316; }
.circle.red { stroke: #ef4444; }

.percentage {
    fill: var(--text-primary, #1f2937);
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
}

.score-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    margin-top: 4px;
}

/* Details grid */
.health-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.health-detail-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary, #f9fafb);
    border-radius: 8px;
}

.health-detail-card .health-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-light, #f5f3ff);
    color: var(--primary-color, #6D28D9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.health-detail-card .health-detail-icon i {
    width: 20px;
    height: 20px;
}

.health-detail-card .health-detail-content {
    display: flex;
    flex-direction: column;
}

.health-detail-card .health-detail-label {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

.health-detail-card .health-detail-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.health-detail-card .health-detail-hint {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
}

.health-detail-card .health-detail-hint.success {
    color: #22c55e;
}

/* Recommendations */
.health-recommendations {
    margin-bottom: 24px;
}

.health-recommendations h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 12px 0;
}

.recommendation-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.recommendation-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.recommendation-content strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.recommendation-content p {
    font-size: 12px;
    margin: 0;
    opacity: 0.9;
}

.recommendation-item.success {
    background: #dcfce7;
    color: #166534;
}

.recommendation-item.info {
    background: #dbeafe;
    color: #1e40af;
}

.recommendation-item.warning {
    background: #fef3c7;
    color: #92400e;
}

.recommendation-item.error {
    background: #fee2e2;
    color: #dc2626;
}

/* Footer */
.health-details-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.last-campaign {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

/* Selector header */
.health-selector-header {
    margin-bottom: 16px;
}

.health-selector-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.health-count-badge {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary, #6b7280);
}

/* Empty state */
#health-score-empty {
    text-align: center;
    padding: 48px 24px;
}

#health-score-empty i {
    width: 48px;
    height: 48px;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 16px;
}

/* Dark mode support */
[data-theme="dark"] .health-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .health-card.selected {
    background: rgba(109, 40, 217, 0.1);
}

[data-theme="dark"] #health-details-panel {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .health-detail-card {
    background: var(--bg-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .health-score-grid {
        grid-template-columns: 1fr;
    }
    
    .health-details-grid {
        grid-template-columns: 1fr;
    }
    
    .health-details-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}


/* ============================================
   Health Warning Dialog Styles
   (extends enhanced-confirm-dialog)
   ============================================ */

/* Warning messages list */
.health-warning-messages {
    text-align: left;
    margin: 16px 0;
}

.health-warning-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: #fef3c7;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.4;
}

.health-warning-message:last-child {
    margin-bottom: 0;
}

.health-warning-message i,
.health-warning-message svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    max-width: 16px;
    min-height: 16px;
    max-height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.health-warning-message.high {
    background: #fee2e2;
    color: #991b1b;
}

.health-warning-message.medium {
    background: #fef3c7;
    color: #92400e;
}

.health-warning-message.low {
    background: #dbeafe;
    color: #1e40af;
}

/* Stats pills */
.health-warning-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.health-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-secondary, #f3f4f6);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

.health-stat-pill strong {
    color: var(--text-primary, #374151);
}

/* Dark mode */
[data-theme="dark"] .health-warning-message {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

[data-theme="dark"] .health-warning-message.high {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .health-warning-message.low {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .health-stat-pill {
    background: var(--bg-tertiary);
}
