/* Pogoda dla Scenotechniki — style widoku mapy (views/site/index.php).
   Ładowane przez app\assets\MapAsset. */

[x-cloak]{display:none!important;}
.pogoda-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .pogoda-layout { grid-template-columns: 1fr; } }
.map-col { display: flex; flex-direction: column; }
.map-wrap { position: relative; height: 80vh; min-height: 480px; }
.under-map { display: flex; justify-content: flex-end; margin-top: 8px; }
#map { position: absolute; inset: 0; border-radius: 10px; border: 1px solid #d6dbe1; z-index: 0; }
.pogoda-sidebar { display: flex; flex-direction: column; gap: 14px; }
.warn-list { max-height: 42vh; overflow-y: auto; margin-top: 4px; }
.card-box { background: #fff; border: 1px solid #e3e7ec; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card-box h2 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.data-age { font-size: 11px; color: #7a828c; font-weight: 400; }
.warn-item { border-left: 4px solid #ccc; padding: 6px 10px; margin-bottom: 8px; background: #f8f9fb; border-radius: 4px; }
.warn-item .wt { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.warn-item .wd { font-size: 12px; color: #4a4f57; margin-top: 2px; }
.warn-item .wm { font-size: 11px; color: #7a828c; margin-top: 4px; }
.badge-lvl { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.lvl-1 { border-left-color: #f1c40f; } .lvl-1 .badge-lvl { background: #d4ac0d; }
.lvl-2 { border-left-color: #e67e22; } .lvl-2 .badge-lvl { background: #e67e22; }
.lvl-3 { border-left-color: #e74c3c; } .lvl-3 .badge-lvl { background: #c0392b; }
.lvl-0 .badge-lvl { background: #95a5a6; }
.wind-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wind-table th { text-align: left; color: #7a828c; font-weight: 500; padding: 3px 6px; border-bottom: 1px solid #eee; }
.wind-table td { padding: 3px 6px; border-bottom: 1px solid #f2f4f6; }
.wind-ok { color: #27ae60; } .wind-warn { color: #e67e22; font-weight: 600; } .wind-danger { color: #c0392b; font-weight: 700; }
.wind-tl { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.wind-tl .wtl-play { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; background: #2c3e50; color: #fff; font-size: 11px; line-height: 26px; }
.wind-tl .wtl-play:hover { background: #1a252f; }
.wind-tl input[type=range] { flex: 1 1 auto; min-width: 60px; }
.wind-tl .wtl-time { flex: 0 0 auto; font-size: 11px; color: #2c3e50; font-weight: 600; font-variant-numeric: tabular-nums; }
.muted { color: #7a828c; font-size: 12px; }
.hint { font-size: 12px; color: #7a828c; margin-top: 4px; }

/* markery wiatru na mapie */
.wind-di { background: transparent; border: 0; }
.wind-mark { display: flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 12px; background: rgba(255,255,255,.9); border: 1px solid #cfd6dd; font-size: 12px; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.2); white-space: nowrap; }
.wind-mark .wind-arrow { display: inline-block; font-size: 14px; line-height: 1; }
.wind-mark.wind-ok { color: #1e8449; } .wind-mark.wind-warn { color: #b9770e; border-color:#e67e22; } .wind-mark.wind-danger { color: #fff; background: #c0392b; border-color:#c0392b; }

/* oś czasu radaru (styl antistorm) */
.radar-timeline { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1000;
    background: rgba(255,255,255,.94); border: 1px solid #cfd6dd; border-radius: 10px;
    padding: 8px 12px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.18);
    backdrop-filter: blur(2px); flex-wrap: wrap; }
.radar-timeline .play-btn { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
    background: #2c3e50; color: #fff; font-size: 14px; line-height: 34px; text-align: center; }
.radar-timeline .play-btn:hover { background: #1a252f; }
.radar-timeline .stop-btn { background: #7f8c8d; font-size: 12px; }
.radar-timeline .stop-btn:hover { background: #5f6a6b; }
.radar-timeline .stop-btn.is-live { background: #27ae60; }
.radar-timeline .tl-slider { flex: 1 1 200px; min-width: 140px; }
.radar-timeline .tl-slider input { width: 100%; }
.radar-timeline .tl-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: #2c3e50; min-width: 108px; text-align: center; }
.radar-timeline .tl-frame { font-size: 11px; color: #7a828c; }
.radar-timeline .tl-prod { font-size: 12px; font-weight: 600; color: #2c3e50; white-space: nowrap; }
.radar-timeline .prod-group { display: flex; gap: 4px; }
.radar-timeline .prod-btn { border: 1px solid #cfd6dd; background: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.radar-timeline .prod-btn.active { background: #2c3e50; color: #fff; border-color: #2c3e50; }
.radar-timeline .op-wrap { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #7a828c; }
.radar-timeline .op-wrap input { width: 70px; }
.radar-timeline .tl-hint { flex: 1 1 100%; font-size: 11px; color: #b9770e; text-align: center; }
.radar-overlay { image-rendering: pixelated; }
.nowcast-legend { position: absolute; left: 12px; bottom: 78px; z-index: 900; background: rgba(255,255,255,.9);
    padding: 6px 8px; border-radius: 6px; font-size: 11px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.nowcast-legend .nl-title { font-weight: 600; margin-bottom: 3px; color: #2c3e50; }
.nowcast-legend .nl-bar { width: 150px; height: 12px; border-radius: 2px;
    background: linear-gradient(to right, rgb(230,30,30), rgb(250,210,40), rgb(40,190,90)); }
.nowcast-legend .nl-scale { display: flex; justify-content: space-between; color: #4a4f57; margin-top: 2px; }
.refresh-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfd6dd; background: #fff; color: #2c3e50; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.refresh-btn:hover:not(:disabled) { background: #f2f4f6; }
.refresh-btn:disabled { opacity: .6; cursor: default; }
.refresh-ico { display: inline-block; font-size: 15px; line-height: 1; }
.refresh-ico.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.gps-btn { width: 34px; height: 34px; background: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 17px; line-height: 34px; color: #2d7ef7; box-shadow: 0 1px 4px rgba(0,0,0,.3); display: block; }
.gps-btn:hover { background: #f2f4f6; }
.gps-di { background: transparent; border: 0; }
.gps-dot { width: 14px; height: 14px; border-radius: 50%; background: #2d7ef7; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(45,126,247,.4); animation: gpspulse 1.6s ease-out infinite; }
@keyframes gpspulse { 0% { box-shadow: 0 0 0 2px rgba(45,126,247,.5); } 100% { box-shadow: 0 0 0 13px rgba(45,126,247,0); } }
.gps-error { background: #fdecea; border: 1px solid #f5c6c2; color: #a5342b; font-size: 13px; padding: 6px 12px; border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.legend-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #4a4f57; margin-top: 4px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ocena szczytu porywu + wykres wiatru */
.peak { font-size: 12px; padding: 5px 8px; border-radius: 6px; margin-bottom: 8px; background: #eef7f0; color: #1e8449; }
.peak.wind-warn { background: #fdf0e2; color: #9c5a12; }
.peak.wind-danger { background: #fdeceb; color: #a5342b; font-weight: 600; }
.nc { padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; }
.nc-dry { background: #e8f5e9; color: #2e7d32; }
.nc-now { background: #e3f2fd; color: #1565c0; }
.nc-incoming { background: #fff3e0; color: #b9540a; }
.wind-chart-wrap { width: 100%; }
.wind-chart { width: 100%; height: 118px; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: #7a828c; margin: 2px 0 6px; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 3px; border-radius: 2px; }

/* legenda skali radaru (IMGW) */
.radar-legend { position: absolute; right: 12px; bottom: 78px; z-index: 900; max-height: 168px; width: auto;
    background: rgba(255,255,255,.92); border: 1px solid #cfd6dd; border-radius: 6px; padding: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* przycisk mobilny + baner starych danych */
.mobile-toggle { display: none; border: 1px solid #cfd6dd; background: #fff; color: #2c3e50; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.stale-banner { background: #fff4e5; border: 1px solid #f0c98a; color: #8a5a12; font-size: 13px; padding: 7px 12px; border-radius: 8px; margin-bottom: 8px; }
.age-stale { color: #c0392b !important; font-weight: 700; }

@media (max-width: 900px) {
    .pogoda-layout { display: flex; flex-direction: column; }
    .map-col { order: -1; }             /* mapa nad panelem, panel zawsze pod nią */
    /* Duża, ale NIE cały ekran — inaczej mapa łapie cały dotyk i nie da się
       przewinąć strony do panelu. ~76vh zostawia pasek panelu do chwytu. */
    .map-wrap { height: 76vh; height: 76dvh; min-height: 320px; }
    .radar-legend { max-height: 120px; bottom: 92px; }
    .nowcast-legend { bottom: 110px; }
    /* kompaktowy pasek osi czasu na mobile (mniej linii) */
    .radar-timeline { gap: 8px; padding: 6px 8px; }
    .radar-timeline .tl-slider { flex: 1 1 90px; min-width: 80px; }
    .radar-timeline .tl-time { min-width: 0; font-size: 12px; }
    .radar-timeline .tl-frame { display: none; }
    .radar-timeline .play-btn { width: 30px; height: 30px; line-height: 30px; }
    .under-map { justify-content: center; }
    .warn-list { max-height: 30vh; }    /* zwarte ostrzeżenia — bliżej do wiatru/nowcastu */
    .card-box { padding: 10px 12px; }
}
