/* gauges.css - Dual circular gauge system styles */
/* Matches the exact mockup design with smooth color transitions */

/* Gauge Container */
.gauge-container {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Individual Gauge Wrapper */
.gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 200px;
}

.gauge-label {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

/* Gauge Circle */
.gauge {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: var(--spacing-sm);
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
}

/* Gauge Center Content */
.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-percentage {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.gauge-icon {
    font-size: 20px;
    margin-top: 4px;
    opacity: 0.8;
}

/* Safety gauge check mark */
#safety-gauge .gauge-icon {
    color: var(--success-color);
}

/* Quality gauge star */
#quality-gauge .gauge-icon {
    color: var(--warning-color);
}

/* Gauge Detail Button */
.gauge-detail-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 36px;
}

.gauge-detail-btn:hover {
    background-color: var(--background);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Gauge Progress Animation */
.gauge-progress-animation {
    animation: fillProgress 1.5s ease-out forwards;
}

@keyframes fillProgress {
    from {
        stroke-dashoffset: 502.65;
    }
}

/* Gauge Color Classes */
.gauge-excellent {
    stroke: var(--success-color) !important;
}

.gauge-good {
    stroke: var(--warning-color) !important;
}

.gauge-fair {
    stroke: var(--orange-color) !important;
}

.gauge-poor {
    stroke: var(--danger-color) !important;
}

/* Gauge Detail Modal Content */
.gauge-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.detail-category {
    padding: var(--spacing-md);
    background-color: var(--background);
    border-radius: var(--radius-md);
}

.detail-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.detail-category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-category-score {
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.detail-category-info {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

.detail-source {
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-style: italic;
}

/* Score breakdown bar */
.score-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.score-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
}

/* Overall score summary */
.overall-summary {
    padding: var(--spacing-lg);
    background-color: var(--background);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.overall-score {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.overall-label {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

/* Data sources section */
.data-sources {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.sources-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.source-list {
    list-style: none;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.source-list li {
    padding: var(--spacing-xs) 0;
}

.source-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.source-list a:hover {
    text-decoration: underline;
}

/* Mobile Responsive Gauges */
@media (max-width: 480px) {
    .gauge-container {
        padding: var(--spacing-md);
    }
    
    .gauge {
        width: 130px;
        height: 130px;
    }
    
    .gauge-percentage {
        font-size: 28px;
    }
    
    .gauge-label {
        font-size: var(--font-size-sm);
    }
}

/* Tablet and larger */
@media (min-width: 768px) {
    .gauge {
        width: 180px;
        height: 180px;
    }
    
    .gauge-percentage {
        font-size: 36px;
    }
}