/* ===== SEZIONE METEO LOCALE ===== */

/* Stili base per la sezione meteo */
.weather-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.weather-card .card-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.weather-detail {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.weather-detail i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.weather-detail small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.weather-detail strong {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===== RESPONSIVE METEO LOCALE ===== */

/* Forza il container principale a non overflow */
#weather-news {
    overflow-x: hidden !important;
}

#weather-news .container {
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

#weather-news .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Stili per la richiesta di geolocalizzazione */
#weather-news #location-request .alert {
    padding: 1.5rem !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
}

#weather-news #location-request .alert h5 {
    font-size: 1.1rem !important;
    margin-bottom: 0.75rem !important;
}

#weather-news #location-request .alert p {
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
}

/* Pulsanti responsive */
#weather-news #location-request .btn {
    margin: 0.25rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
}

/* Selezione manuale responsive */
#weather-news #manual-selection {
    padding: 0 15px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

#weather-news #manual-selection .col-md-8 {
    max-width: 100% !important;
    padding: 0 10px !important;
}

#weather-news #manual-selection .form-select,
#weather-news #manual-selection .form-control {
    font-size: 1rem !important;
    padding: 0.75rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#weather-news #manual-selection .input-group {
    max-width: 100% !important;
    overflow: hidden !important;
}

#weather-news #manual-selection .input-group .btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
}

/* Media queries per mobile */
@media (max-width: 768px) {
    #weather-news {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    #weather-news .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    #weather-news #location-request .alert {
        padding: 1rem !important;
        margin: 0 5px !important;
        max-width: calc(100% - 10px) !important;
    }
    
    #weather-news #location-request .alert h5 {
        font-size: 1rem !important;
    }
    
    #weather-news #location-request .alert p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Pulsanti in colonna su mobile */
    #weather-news #location-request .btn {
        display: block !important;
        width: calc(100% - 10px) !important;
        margin: 0.5rem 5px !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
        text-align: center !important;
        white-space: normal !important;
    }
    
    #weather-news #location-request .btn:first-of-type {
        margin-bottom: 0.5rem !important;
    }
    
    /* Selezione manuale ottimizzata per mobile */
    #weather-news #manual-selection {
        padding: 0 5px !important;
    }
    
    #weather-news #manual-selection .col-md-8 {
        padding: 0 5px !important;
        max-width: 100% !important;
    }
    
    #weather-news #manual-selection .form-select,
    #weather-news #manual-selection .form-control {
        font-size: 16px !important; /* Previene zoom su iOS */
        padding: 0.875rem 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #weather-news #manual-selection .input-group {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #weather-news #manual-selection .input-group .btn {
        padding: 0.875rem 0.75rem !important;
        font-size: 0.85rem !important;
        min-width: 60px !important;
        flex-shrink: 0 !important;
    }
    
    #weather-news #manual-selection .form-text {
        font-size: 0.8rem !important;
    }
    
    .weather-detail {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .weather-icon {
        width: 60px;
        height: 60px;
    }
    
    #current-temp {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 576px) {
    #weather-news #location-request .alert {
        margin: 0 2px !important;
        padding: 0.875rem !important;
        max-width: calc(100% - 4px) !important;
    }
    
    #weather-news #location-request .alert h5 {
        font-size: 0.95rem !important;
    }
    
    #weather-news #location-request .alert p {
        font-size: 0.8rem !important;
    }
    
    #weather-news #location-request .btn {
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
        width: calc(100% - 4px) !important;
        margin: 0.5rem 2px !important;
    }
    
    /* Input group responsive per schermi molto piccoli */
    #weather-news #manual-selection .input-group {
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    
    #weather-news #manual-selection .input-group .form-control {
        flex: 1 1 100% !important;
        margin-bottom: 0.5rem !important;
        border-radius: 0.375rem !important;
        width: 100% !important;
    }
    
    #weather-news #manual-selection .input-group .btn {
        flex: 1 1 100% !important;
        border-radius: 0.375rem !important;
        width: 100% !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 390px) {
    #weather-news #location-request .alert {
        margin: 0 1px !important;
        padding: 0.75rem !important;
        max-width: calc(100% - 2px) !important;
    }
    
    #weather-news #location-request .alert h5 {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #weather-news #location-request .alert p {
        font-size: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #weather-news #location-request .btn {
        padding: 0.625rem 0.5rem !important;
        font-size: 0.8rem !important;
        width: calc(100% - 2px) !important;
        margin: 0.5rem 1px !important;
    }
}