/* ============================================================
   Seaside — időjárás widget (off-canvas panel + animált ikonok)
   ============================================================ */

/* ---------- Lebegő chip (a főoldalon) ---------- */
.wx-chip {
	position: fixed;
	right: 0;
	top: 40%;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px 9px 13px;
	border: 0;
	border-radius: 999px 0 0 999px;
	background: linear-gradient(135deg, #62b8e0, #1b75bc);
	color: #fff;
	box-shadow: 0 10px 26px -10px rgba(20, 88, 140, 0.6);
	cursor: pointer;
	opacity: 0;
	transform: translateX(10px);
	transition: transform 0.25s cubic-bezier(0.3, 1, 0.4, 1), box-shadow 0.2s ease, opacity 0.3s ease;
	-webkit-tap-highlight-color: transparent;
}
/* A fül mindig teljesen látszik — az ikon és a hőmérséklet is. */
body.wx-ready .wx-chip { opacity: 1; transform: translateX(0); }
.wx-chip:hover, .wx-chip:focus-visible { transform: translateX(-3px); box-shadow: 0 14px 30px -10px rgba(20, 88, 140, 0.7); }
.wx-chip.wx-hot { background: linear-gradient(135deg, #f9a03a, #f58220); }
.wx-chip.wx-cold { background: linear-gradient(135deg, #7fc4e8, #1b75bc); }
.wx-chip-ico { width: 30px; height: 30px; flex: none; color: #fff; }
.wx-chip-ico .wx-icon { width: 30px; height: 30px; display: block; }
.wx-chip-temp {
	font-family: "Baloo 2", sans-serif;
	font-weight: 800;
	font-size: 1.15rem;
	line-height: 1;
	white-space: nowrap;
	flex: none;
}
@media (max-width: 640px) {
	.wx-chip { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ---------- Off-canvas panel ---------- */
.wx-backdrop {
	position: fixed; inset: 0;
	background: rgba(13, 40, 62, 0.5);
	backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s;
	z-index: 70;
}
.wx-backdrop.is-open { opacity: 1; visibility: visible; }

.wx-panel {
	position: fixed;
	top: 0; right: 0;
	height: 100%;
	width: min(390px, 100%);
	z-index: 71;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: calc(28px + env(safe-area-inset-top)) 26px calc(28px + env(safe-area-inset-bottom));
	color: #fff;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.36s cubic-bezier(0.3, 1, 0.4, 1);
	background: linear-gradient(165deg, #7ec6ea 0%, #1b75bc 55%, #14588c 100%);
}
.wx-panel.is-open { transform: translateX(0); }
/* Napszak/hőmérséklet szerinti háttér */
.wx-panel.wx-night { background: linear-gradient(165deg, #2a4a6b 0%, #16324f 60%, #0d2036 100%); }
.wx-panel.wx-day.wx-hot { background: linear-gradient(165deg, #ffc06b 0%, #f58220 45%, #d95f13 100%); }
.wx-panel.wx-day.wx-cold { background: linear-gradient(165deg, #a9d8f0 0%, #4a9fd0 55%, #14588c 100%); }

.wx-close {
	position: absolute; top: 16px; right: 18px;
	width: 40px; height: 40px;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.wx-close:hover { background: rgba(255, 255, 255, 0.32); }

.wx-panel-head { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.wx-panel-icon { width: 92px; height: 92px; flex: none; color: #fff; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2)); }
.wx-panel-icon .wx-icon { width: 92px; height: 92px; }
.wx-now { display: grid; }
.wx-place { font-size: 0.9rem; font-weight: 700; opacity: 0.9; letter-spacing: 0.02em; }
.wx-temp { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 3.2rem; line-height: 1; }
.wx-label { font-size: 1rem; font-weight: 700; opacity: 0.95; }

.wx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wx-stat {
	background: rgba(255, 255, 255, 0.16);
	border-radius: 14px;
	padding: 12px 8px;
	text-align: center;
	display: grid;
	gap: 3px;
}
.wx-stat-k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.wx-stat span:last-child { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.05rem; }
.wx-sea-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -6px; }
.wx-sea-row[hidden] { display: none; }

.wx-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wx-mini-day {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	padding: 12px 4px;
	display: grid;
	justify-items: center;
	gap: 5px;
}
.wx-mini-name { font-size: 0.72rem; font-weight: 700; opacity: 0.9; }
.wx-mini-ico { width: 34px; height: 34px; color: #fff; }
.wx-mini-ico .wx-icon { width: 34px; height: 34px; }
.wx-mini-t { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 0.95rem; }
.wx-mini-t small { font-weight: 700; opacity: 0.7; font-size: 0.78rem; margin-left: 2px; }

.wx-more {
	margin-top: auto;
	display: block;
	text-align: center;
	background: #fff;
	color: #14588c;
	font-family: "Baloo 2", sans-serif;
	font-weight: 800;
	text-decoration: none;
	padding: 14px;
	border-radius: 14px;
	box-shadow: 0 8px 20px -8px rgba(0,0,0,0.35);
}
.wx-more:hover { color: #0d2036; }
.wx-src { text-align: center; font-size: 0.74rem; opacity: 0.8; margin: 0; }

/* ---------- Ikon-animációk ---------- */
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-float { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2.5px); } }
@keyframes wx-drop { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(6px); } }
@keyframes wx-flake { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0.2; transform: translateY(7px); } }
@keyframes wx-flash { 0%, 92%, 100% { opacity: 1; } 94% { opacity: 0.25; } 96% { opacity: 1; } }
@keyframes wx-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.wx-rays { transform-origin: 32px 32px; animation: wx-spin 22s linear infinite; }
.wx-sun { transform-origin: 32px 32px; animation: wx-pulse 4s ease-in-out infinite; }
.wx-cloud { animation: wx-float 5s ease-in-out infinite; transform-origin: center; }
.wx-cloud-2 { animation-duration: 6.5s; animation-direction: reverse; }
.wx-drop { animation: wx-drop 1.1s ease-in infinite; }
.wx-flake { animation: wx-flake 1.8s ease-in infinite; }
.wx-bolt { animation: wx-flash 2.4s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
	.wx-rays, .wx-sun, .wx-cloud, .wx-cloud-2, .wx-drop, .wx-flake, .wx-bolt { animation: none; }
	.wx-chip, .wx-backdrop, .wx-panel { transition: none; }
}

/* ---------- Előrejelzés oldal ---------- */
.forecast-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin-top: 28px;
}
.forecast-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: var(--shadow-card);
	padding: 20px 16px;
	text-align: center;
	display: grid;
	gap: 6px;
	justify-items: center;
	border-top: 5px solid var(--sky);
}
.forecast-card.is-today { border-top-color: var(--sun); background: linear-gradient(180deg, #fff, var(--sky-soft)); }
.forecast-day { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.forecast-date { font-size: 0.78rem; color: var(--muted); }
.forecast-ico { width: 64px; height: 64px; color: var(--wave); margin: 4px 0; }
.forecast-ico .wx-icon { width: 64px; height: 64px; }
.forecast-temp { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.forecast-temp small { color: var(--muted); font-size: 0.95rem; font-weight: 700; margin-left: 4px; }
.forecast-label { font-size: 0.82rem; color: var(--muted); min-height: 2.2em; }
.forecast-meta { display: flex; gap: 12px; justify-content: center; font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.forecast-meta span { display: inline-flex; align-items: center; gap: 4px; }
.forecast-loading { text-align: center; color: var(--muted); padding: 40px; }
