/* Стили для модальных окон */
.agro-weather-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.agro-weather-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    display: flex;
    flex-direction: column;
}

.agro-weather-modal-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agro-weather-modal-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.agro-weather-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.agro-weather-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.agro-weather-modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* Стили для контейнеров графиков */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.chart-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.period-selector {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: white;
    font-size: 14px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .agro-weather-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .agro-weather-modal-body {
        padding: 20px;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Стили для индикаторов загрузки */
.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
}

.chart-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}