/* Humidity Control Calculator Specific Styles */

/* Humidity Analysis Display */
.humidity-analysis {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid #10b981;
}

.humidity-header {
    text-align: center;
    margin-bottom: 20px;
}

.humidity-title {
    font-size: 20px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 8px;
}

.humidity-subtitle {
    font-size: 14px;
    color: #064e3b;
}

.humidity-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.humidity-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.humidity-card:hover {
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.humidity-card.optimal {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.humidity-card.high {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.humidity-card.low {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.humidity-card.warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
}

.moisture-sources {
    margin-top: 20px;
}

.moisture-sources h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.source-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.source-item:hover {
    border-color: #2563eb;
    background: #f1f5f9;
}

.source-item input[type="checkbox"] {
    display: none;
}

.source-item input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.source-item input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.source-item:has(input[type="checkbox"]:checked) {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff, #f1f5f9);
}

.source-item .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.source-item .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.source-details {
    flex: 1;
}

.source-details strong {
    display: block;
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.source-details span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.humidity-status {
    margin-bottom: 32px;
}

.status-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.status-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.status-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.status-card.optimal {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.status-card.warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.status-card.danger {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.status-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.status-card.optimal .status-value {
    color: #065f46;
}

.status-card.warning .status-value {
    color: #92400e;
}

.status-card.danger .status-value {
    color: #dc2626;
}

.status-description {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.risk-assessment {
    margin: 32px 0;
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.risk-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.risk-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.risk-card.low {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.risk-card.medium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.risk-card.high {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.risk-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.risk-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.risk-card.low .risk-icon {
    background: #10b981;
}

.risk-card.medium .risk-icon {
    background: #f59e0b;
}

.risk-card.high .risk-icon {
    background: #ef4444;
}

.risk-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.risk-level {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-card.low .risk-level {
    color: #065f46;
}

.risk-card.medium .risk-level {
    color: #92400e;
}

.risk-card.high .risk-level {
    color: #dc2626;
}

.risk-description {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.recommendations {
    margin: 32px 0;
}

.recommendation-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.recommendation-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.recommendation-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.recommendation-item.priority-high {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.recommendation-item.priority-medium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.recommendation-item.priority-low {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.recommendation-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recommendation-item.priority-high .recommendation-priority {
    background: #ef4444;
    color: white;
}

.recommendation-item.priority-medium .recommendation-priority {
    background: #f59e0b;
    color: white;
}

.recommendation-item.priority-low .recommendation-priority {
    background: #10b981;
    color: white;
}

.recommendation-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.recommendation-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.recommendation-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.recommendation-action {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.recommendation-action:hover {
    background: #e2e8f0;
    border-color: #2563eb;
    color: #2563eb;
}

.humidity-chart {
    margin: 32px 0;
}

.chart-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin-top: 16px;
}

.humidity-gauge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.gauge-container {
    position: relative;
    width: 200px;
    height: 100px;
}

.gauge-arc {
    width: 100%;
    height: 100%;
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 80px;
    background: #2563eb;
    transform-origin: bottom center;
    transition: transform 0.8s ease;
}

.gauge-value {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Roboto Mono', monospace;
}

.humidity-ranges {
    space-y: 12px;
}

.range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.range-item.optimal {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: #10b981;
}

.range-item.acceptable {
    background: linear-gradient(135deg, #eff6ff, #f1f5f9);
    border-color: #2563eb;
}

.range-item.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
}

.range-item.danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #ef4444;
}

.range-label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.range-value {
    font-weight: 600;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
}

.range-item.optimal .range-value {
    color: #065f46;
}

.range-item.acceptable .range-value {
    color: #1e40af;
}

.range-item.warning .range-value {
    color: #92400e;
}

.range-item.danger .range-value {
    color: #dc2626;
}

.equipment-list {
    space-y: 12px;
}

.equipment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.equipment-name {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.equipment-range {
    font-weight: 600;
    color: #2563eb;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .source-grid {
        grid-template-columns: 1fr;
    }
    
    .status-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .risk-grid {
        grid-template-columns: 1fr;
    }
    
    .gauge-container {
        width: 150px;
        height: 75px;
    }
    
    .gauge-needle {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .status-overview {
        grid-template-columns: 1fr;
    }
    
    .recommendation-actions {
        flex-direction: column;
    }
    
    .equipment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation for status reveal */
@keyframes statusReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.status-card.animate {
    animation: statusReveal 0.6s ease-out;
}

/* Loading states */
.chart-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.chart-container.loading::after {
    content: "Analyzing humidity...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
}
