/* Wetterseite: eine klare Desktop- und genau eine Mobile-Regelbasis. */

.weather-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); grid-template-rows: 650px 300px; gap: 20px; min-width: 0; }
.panel { min-width: 0; background: rgba(25,30,38,.95); border-radius: 18px; padding: 20px; box-shadow: 0 0 20px rgba(0,0,0,.35); }
.panel h2 { margin-bottom: 15px; color: #fff; }
.weather-summary { margin-bottom: 20px; }
.weather-summary h2 { margin-bottom: 12px; }
#weatherSummary { font-size: 18px; line-height: 1.7; }

.weather-map { grid-row: 1 / 3; overflow: hidden; }
#map { width: 100%; height: calc(100% - 50px); border-radius: 15px; }
.leaflet-container { border-radius: 15px; }
.map-buttons { display: flex; gap: 10px; margin-bottom: 15px; }
.map-buttons button { flex: 1; min-width: 0; padding: 10px; border: 0; border-radius: 8px; background: #2b313b; color: #fff; cursor: pointer; font-size: 15px; }
.map-buttons button:hover, .map-buttons button.active { background: #ff9800; }

.weather-now { display: flex; flex-direction: column; align-items: center; }
.temp { font-size: 72px; font-weight: bold; margin-top: 20px; }
.condition { font-size: 26px; margin-bottom: 25px; text-align: center; }
.weather-location { margin: 10px 0; font-size: 14px; color: #bfc7d5; line-height: 1.6; text-align: center; }
.weather-table { width: 100%; border-collapse: collapse; }
.weather-table td { padding: 8px 4px; }
.weather-table td:first-child { width: 65%; }
.weather-table td:last-child { width: 35%; text-align: right; white-space: nowrap; }

.weather-warning { margin-top: 15px; padding: 15px; border-radius: 12px; background: #1f8f3a; color: #fff; font-size: 17px; font-weight: bold; }
.weather-warning.warning { background: #d98c00; }
.weather-warning.danger { background: #c62828; animation: blinken 1s infinite; }
@keyframes blinken { 50% { opacity: .6; } }

.forecast { overflow: auto; }
.forecast-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
.forecast-card { background: rgba(255,255,255,.08); border-radius: 12px; padding: 15px; text-align: center; }
.temperature-panel { margin-top: 20px; }
.temperature-chart { position: relative; width: 100%; height: 280px; }

@media (max-width: 700px) {
    html, body { width: 100%; overflow-x: hidden !important; }
    /* Die Vorlage setzt display:flex inline; !important macht daraus mobil
       bewusst einen vertikalen Ablauf statt Sidebar + Inhalt nebeneinander. */
    #dashboard { display: block !important; width: 100%; height: auto; min-height: 100vh; }
    .sidebar { width: 100%; padding: 14px; border-right: 0; border-bottom: 1px solid #232f3c; }
    .sidebar .logo { margin-bottom: 14px; }
    .sidebar ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .sidebar li { min-width: 0; margin: 0; padding: 11px 8px; text-align: center; }
    .content { width: 100%; min-width: 0; padding: 16px; }
    .topbar { display: block; margin-bottom: 16px; }
    .topbar h1 { font-size: 28px; margin-bottom: 14px; }
    .status { display: inline-block; }

    .weather-summary, .weather-grid, .panel, .forecast-grid, .temperature-panel { width: 100%; min-width: 0; max-width: none; }
    .weather-grid { display: flex; flex-direction: column; height: auto; gap: 15px; }
    .panel { padding: 16px; box-sizing: border-box; }
    .weather-map { order: 1; height: 380px; min-height: 380px; grid-row: auto; }
    #map { height: calc(100% - 88px); }
    .weather-now { order: 2; align-items: center; }
    .forecast { order: 3; overflow: visible; }
    .temperature-panel { order: 4; margin-top: 0; }
    .temp { font-size: 42px; margin-top: 8px; }
    .condition { font-size: 17px; line-height: 1.4; margin-bottom: 12px; }
    .weather-table { table-layout: fixed; }
    .weather-table td { padding: 6px 3px; overflow-wrap: anywhere; }
    .weather-table td:first-child { width: 55%; }
    .weather-table td:last-child { width: 45%; white-space: normal; }
    #weatherSummary { font-size: 16px; line-height: 1.5; }
    .weather-warning { padding: 12px; font-size: 15px; }
    .forecast-grid { display: block; }
    .forecast-grid > div { width: 100%; margin-bottom: 8px; box-sizing: border-box; }
    .temperature-chart { height: 250px; }
}
