/* Agricultural Data Module Styles */

/* Summary Cards Grid */
.ag-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Individual Cards */
.ag-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 120px;
}

.ag-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Card Color Coding */
.ag-card-heating { border-color: #ff6b6b; background: linear-gradient(135deg, #fff 0%, #ffe5e5 100%); }
.ag-card-cooling { border-color: #4ecdc4; background: linear-gradient(135deg, #fff 0%, #e0f7f5 100%); }
.ag-card-gdd { border-color: #95e1d3; background: linear-gradient(135deg, #fff 0%, #f0faf8 100%); }
.ag-card-et { border-color: #38ada9; background: linear-gradient(135deg, #fff 0%, #e8f5f4 100%); }
.ag-card-sunshine { border-color: #f9ca24; background: linear-gradient(135deg, #fff 0%, #fff8e6 100%); }
.ag-card-solar { border-color: #ff9ff3; background: linear-gradient(135deg, #fff 0%, #fff0fc 100%); }

.ag-card-icon {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}

.ag-card-content {
    flex: 1;
    min-width: 0;
}

.ag-card-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ag-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.1;
}

.ag-card-help {
    font-size: 11px;
    color: #95a5a6;
    font-style: italic;
}

/* Unavailable State */
.ag-card-unavailable {
    opacity: 0.6;
    background: #f8f9fa !important;
}

.ag-unavailable {
    color: #e74c3c;
    font-size: 16px;
    font-weight: 600;
}

/* Data Date */
.ag-data-date {
    text-align: center;
    color: #7f8c8d;
    margin-top: 10px;
    font-size: 13px;
}

/* Notices */
.ag-notice {
    padding: 15px 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin: 20px 0;
}

.ag-notice-box {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ag-notice-box.ag-warning {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    color: #856404;
}

.ag-notice-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Chart Container */
.ag-chart-container {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.ag-chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* Sections */
.ag-degree-days-section,
.ag-et-section,
.ag-solar-section,
.ag-rain-section,
.ag-comparison-section,
.ag-planting-section {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.ag-degree-days-section h3,
.ag-et-section h3,
.ag-solar-section h3,
.ag-rain-section h3,
.ag-comparison-section h3,
.ag-planting-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Explanation Boxes */
.ag-explanation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.ag-explanation h4 {
    margin-top: 0;
    color: #2c3e50;
}

.ag-explanation p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.ag-explanation ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ag-explanation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.ag-explain-item {
    margin-bottom: 15px;
}

.ag-explain-item strong {
    color: #34495e;
    display: block;
    margin-bottom: 5px;
}

/* Summary Stats */
.ag-summary-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.ag-stat {
    flex: 1;
    min-width: 180px;
    padding: 20px;
    background: linear-gradient(135deg, #ecf0f1 0%, #f8f9fa 100%);
    border-radius: 8px;
    text-align: center;
}

.ag-stat-label {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.ag-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

/* Metrics Display */
.ag-et-metrics,
.ag-solar-metrics,
.ag-rain-metrics,
.ag-monthly-solar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ag-metric {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.ag-metric-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 600;
}

.ag-metric-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
}

/* Irrigation Guide */
.ag-irrigation-guide {
    margin: 20px 0;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
}

.ag-irrigation-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
}

.ag-status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ag-status-light { background: #4caf50; }
.ag-status-moderate { background: #ff9800; }
.ag-status-heavy { background: #f44336; }
.ag-status-critical { background: #d32f2f; animation: pulse 2s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ag-status-text {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.ag-water-balance {
    margin-top: 20px;
}

.ag-balance-calc {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    margin: 10px 0;
}

.ag-balance-result {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 10px;
}

.ag-advice {
    padding: 15px;
    background: #fff;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
    margin-top: 15px;
}

/* Comparison Detail Sections */
.ag-comparison-detail {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ag-comparison-detail h4 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.ag-comparison-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.ag-compare-item.ag-increase {
    border-left-color: #e74c3c;
}

.ag-compare-item.ag-decrease {
    border-left-color: #27ae60;
}

.ag-compare-item.ag-same {
    border-left-color: #95a5a6;
}

/* Rainfall has inverted colors - increase is good (green), decrease is bad (red) */
.ag-compare-item.ag-rainfall.ag-increase {
    border-left-color: #27ae60;
}

.ag-compare-item.ag-rainfall.ag-decrease {
    border-left-color: #e74c3c;
}

/* Comparison Table */
.ag-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ag-comparison-table th,
.ag-comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.ag-comparison-table th {
    background: #34495e;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.ag-comparison-table tbody tr:hover {
    background: #f8f9fa;
}

.ag-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Change Indicators */
.ag-increase {
    color: #e74c3c;
    font-weight: 600;
}

.ag-decrease {
    color: #27ae60;
    font-weight: 600;
}

.ag-same {
    color: #95a5a6;
    font-weight: 600;
}

/* Interpretation */
.ag-interpretation {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ag-interpretation h4 {
    margin-top: 0;
    color: #1976d2;
}

.ag-interpretation ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ag-interpretation li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Rain Analysis */
.ag-rain-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ag-compare-item {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.ag-compare-item strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
}

.ag-effectiveness {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
}

.ag-score-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.ag-score-bar {
    flex: 1;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.ag-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 50%, #27ae60 100%);
    transition: width 0.5s ease;
}

.ag-score-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    min-width: 60px;
}

.ag-score-explanation {
    margin-top: 10px;
    font-size: 14px;
}

/* Planting Conditions */
.ag-conditions-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ag-condition {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.ag-condition-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.ag-condition-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.ag-condition small {
    font-size: 11px;
    color: #95a5a6;
}

/* Recommendations */
.ag-recommendations {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.ag-rec {
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.ag-rec-good {
    background: #e8f5e9;
    border-color: #4caf50;
}

.ag-rec-warning {
    background: #fff3e0;
    border-color: #ff9800;
}

.ag-link-to-guide {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
}

.ag-link-to-guide a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
}

.ag-link-to-guide a:hover {
    text-decoration: underline;
}

/* Module Disabled Message */
.dwd-module-disabled {
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #95a5a6;
    border-radius: 4px;
    color: #7f8c8d;
    margin: 20px 0;
}

/* Forecast Alerts */
.ag-forecast-alerts {
    margin: 20px 0;
}

.ag-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.ag-alert-warning {
    background: #fff3cd;
    border-color: #ff9800;
    color: #856404;
}

.ag-alert-danger,
.ag-alert-severe {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.ag-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.ag-alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

/* Inigo Jones Forecast Grid */
.ag-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ag-forecast-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ag-forecast-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ag-forecast-date {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ag-forecast-source {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ag-source-dayboro {
    background: #4caf50;
    color: #fff;
}

.ag-source-inigo {
    background: #9c27b0;
    color: #fff;
}

.ag-forecast-temps {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
}

.ag-temp-max {
    color: #e74c3c;
    font-size: 16px;
    font-weight: 600;
}

.ag-temp-min {
    color: #3498db;
    font-size: 14px;
}

.ag-forecast-pop {
    padding: 8px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 13px;
    font-weight: 600;
}

.ag-pop-low {
    background: #e8f5e9;
    color: #2e7d32;
}

.ag-pop-medium {
    background: #fff3e0;
    color: #e65100;
}

.ag-pop-high {
    background: #ffebee;
    color: #c62828;
}

.ag-forecast-remarks {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 8px;
    font-style: italic;
}

/* Wind Metrics */
.ag-wind-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ag-wind-section .ag-metric {
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.ag-spray-safety {
    margin-top: 30px;
}

/* Planting Groups */
.ag-planting-group {
    margin: 30px 0;
}

.ag-planting-group h4 {
    color: #2c3e50;
    border-bottom: 2px solid #27ae60;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.ag-plant-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.ag-plant-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #27ae60;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ag-plant-item strong {
    color: #2c3e50;
    font-size: 14px;
}

.ag-plant-item span {
    color: #7f8c8d;
    font-size: 12px;
}

/* Inigo Jones Section */
.ag-inigo-section {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.ag-inigo-section h3 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Wind Section */
.ag-wind-section {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.ag-wind-section h3 {
    color: #2c3e50;
    border-bottom: 3px solid #2196f3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ag-summary-grid {
        grid-template-columns: 1fr;
    }

    .ag-summary-stats {
        flex-direction: column;
    }

    .ag-stat {
        min-width: 100%;
    }

    .ag-card-value {
        font-size: 28px;
    }

    .ag-comparison-table {
        font-size: 13px;
    }

    .ag-comparison-table th,
    .ag-comparison-table td {
        padding: 10px;
    }

    .ag-score-display {
        flex-direction: column;
        align-items: stretch;
    }

    .ag-score-value {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ag-card {
        flex-direction: column;
        text-align: center;
    }

    .ag-card-icon {
        font-size: 42px;
    }

    .ag-card-value {
        font-size: 24px;
    }
}

/* UV Index Color Coding */
.ag-uv-low {
    color: #27ae60;
    font-weight: 700;
}

.ag-uv-moderate {
    color: #f39c12;
    font-weight: 700;
}

.ag-uv-high {
    color: #e74c3c;
    font-weight: 700;
}

/* Solar Tips Section */
.ag-solar-tips {
    background: #fff8e6;
    border: 2px solid #f9ca24;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ag-solar-tips h4 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.ag-solar-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ag-solar-tips li {
    padding: 8px 0;
    border-bottom: 1px solid #fff3cd;
    line-height: 1.6;
}

.ag-solar-tips li:last-child {
    border-bottom: none;
}

.ag-solar-tips strong {
    color: #d35400;
}

/* Monthly Solar Section */
.ag-monthly-solar {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.ag-monthly-solar h4 {
    color: #34495e;
    margin-bottom: 15px;
}

/* Air Quality Section */
.ag-airquality-section {
    margin: 30px 0;
}

.ag-gas-section {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.ag-gas-section.ag-warning-section {
    background: #fff3cd;
    border-color: #ffc107;
}

.ag-gas-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

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

.ag-gas-info {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid #3498db;
}

.ag-gas-info.ag-warning-info {
    border-left-color: #e74c3c;
}

.ag-gas-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.ag-gas-info li {
    margin: 8px 0;
    line-height: 1.6;
}

/* CO2 Levels */
.ag-co2-normal {
    color: #27ae60;
    font-weight: 700;
}

.ag-co2-elevated {
    color: #2980b9;
    font-weight: 700;
}

/* Ozone Levels */
.ag-o3-normal {
    color: #27ae60;
    font-weight: 700;
}

.ag-o3-high {
    color: #e67e22;
    font-weight: 700;
}

/* PM Levels */
.ag-pm-normal {
    color: #27ae60;
    font-weight: 700;
}

.ag-pm-high {
    color: #e74c3c;
    font-weight: 700;
}

/* Air Quality Tips */
.ag-airquality-tips {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ag-airquality-tips h4 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 15px;
}

.ag-airquality-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ag-airquality-tips li {
    padding: 8px 0;
    border-bottom: 1px solid #c8e6c9;
    line-height: 1.6;
}

.ag-airquality-tips li:last-child {
    border-bottom: none;
}

.ag-airquality-tips strong {
    color: #1b5e20;
}

/* CO2 Absorption Section */
.ag-co2-absorption {
    background: #f1f8f4;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ag-co2-absorption h5 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 10px;
}

.ag-absorption-meters {
    margin: 20px 0;
}

.ag-absorption-item {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ag-absorption-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ag-absorption-icon {
    font-size: 24px;
    margin-right: 10px;
}

.ag-absorption-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.ag-absorption-bar {
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ag-absorption-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.ag-absorption-fill-veggie {
    background: linear-gradient(90deg, #f39c12 0%, #f1c40f 100%);
}

.ag-absorption-fill-lawn {
    background: linear-gradient(90deg, #16a085 0%, #1abc9c 100%);
}

.ag-absorption-value {
    font-size: 14px;
    color: #34495e;
}

.ag-absorption-value strong {
    font-size: 16px;
    color: #27ae60;
}

.ag-absorption-equiv {
    font-size: 12px;
    color: #7f8c8d;
    margin-left: 8px;
}

.ag-absorption-note {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.6;
}
