/**
 * Charts Controls CSS - buttons, form controls, and interactions
 */

/* Weather controls container */
.weernormaal-container .weather-controls {
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 1rem;
}

.weernormaal-container .control-group {
    position: relative;
    padding-right: 160px; /* Space for absolutely positioned station dropdown */
}

.weernormaal-container .control-group h3 {
    display: none;
}

.weernormaal-container .metric-buttons {
    margin-bottom: 1rem;
}

.weernormaal-container .period-buttons {
    margin-bottom: 0.5rem;
}

.weernormaal-container .period-buttons h4 {
    display: none;
}

/* Period and station layout - no longer flex */
.weernormaal-container .period-and-station {
    display: block;
}

.weernormaal-container .period-controls {
    margin-bottom: 0.5rem;
}

/* Station selector - absolutely positioned to right */
.weernormaal-container .station-selector {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 140px;
    z-index: 10;
}

.weernormaal-container .station-selector label {
    font-size: 14px;
    font-weight: normal;
    color: #333;
    margin: 0;
}

.weernormaal-container .weather-select {
    border: 1px solid #333;
    color: #333;
    background-color: #fff;
    padding: 6px 10px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 0;
    transition: none;
    font-weight: normal;
    min-width: 140px;
}

.weernormaal-container .weather-select:hover {
    background-color: #f8f9fa;
}

.weernormaal-container .weather-select:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
    background-color: #fff;
}

/* Anomaly specific controls */
.weernormaal-container .anomalie-metric-buttons {
    margin-bottom: 1rem;
}

.weernormaal-container .mode-buttons {
    margin-bottom: 1rem;
}

.weernormaal-container .daily-periods {
    margin-bottom: 1.5rem;
}

.weernormaal-container .temperature-metrics {
    margin-bottom: 1rem;
}

/* Weather buttons */
.weernormaal-container .weather-button {
    border: none;
    color: white;
    background-color: black;
    padding: 6px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
    margin: 2px 1px;
    cursor: pointer;
    border-radius: 0;
    transition: none;
    font-weight: normal;
}

.weernormaal-container .weather-button:hover {
    background-color: black;
}

.weernormaal-container .weather-button:active {
    background-color: grey;
}

.weernormaal-container .weather-button.active {
    background-color: grey;
}

.weernormaal-container .weather-button.loading {
    background-color: #333;
    cursor: not-allowed;
    opacity: 0.7;
}

.weernormaal-container .weather-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Download controls */
.weernormaal-container .chart-download {
    position: relative;
    display: inline-block;
}

.weernormaal-container .download-button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.1s ease;
}

.weernormaal-container .download-button:hover {
    background: #e9ecef;
}

.weernormaal-container .download-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 80px;
    display: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.weernormaal-container .download-dropdown[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

.weernormaal-container .download-option {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.1s ease;
}

.weernormaal-container .download-option:hover {
    background: #f8f9fa;
}

.weernormaal-container .download-option:first-child {
    border-radius: 4px 4px 0 0;
}

.weernormaal-container .download-option:last-child {
    border-radius: 0 0 4px 4px;
}

/* Focus styles for accessibility */
.weernormaal-container .weather-button:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.weernormaal-container .download-button:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.weernormaal-container .download-option:focus {
    background: #e9ecef;
    outline: none;
}

/* Mobile responsiveness for station selector */
@media (max-width: 768px) {
    .weernormaal-container .control-group {
        padding-right: 0; /* Remove right padding on mobile */
    }
    
    .weernormaal-container .station-selector {
        position: static; /* Back to normal flow on mobile */
        align-items: flex-start;
        margin-top: 1rem;
    }
    
    .weernormaal-container .period-and-station {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}
