/* =================================================================
   Napi Időjárás Widget  –  assets/widget.css  v1.1.0
   Prefix: napi-weather-widget
   ================================================================= */

/* ── Alap kártya ─────────────────────────────────────────────── */

.napi-weather-widget {
	width: 100%;
	max-width: 520px;
	height: 380px;
	border-radius: 24px;
	overflow: hidden;
	background: linear-gradient(150deg, #e8f5e9 0%, #f1f8f2 50%, #fef9f0 100%);
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.13), 0 2px 8px rgba(15,23,42,0.06);
	border: 1px solid rgba(255, 255, 255, 0.8);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #0f172a;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	position: relative;
	cursor: pointer;
}

.napi-weather-widget--stale { opacity: 0.74; }

.napi-weather-widget--error,
.napi-weather-widget__notice {
	padding: 16px 20px;
	font-size: 14px;
	color: #64748b;
}

/* ── Teljes widget kattintható overlay ──────────────────────── */

.napi-weather-widget__full-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
}

/* ── Fejléc: vármegye riasztás sáv ───────────────────────────── */

.napi-weather-widget__alert {
	padding: 13px 16px 12px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.napi-weather-widget__alert--clear     { background: rgba(22, 163, 74, 0.09); }
.napi-weather-widget__alert--warning   { background: rgba(202, 138, 4, 0.12); }
.napi-weather-widget__alert--level-1   { background: rgba(202, 138, 4, 0.12); }
.napi-weather-widget__alert--level-2   { background: rgba(234, 88, 12, 0.12); }
.napi-weather-widget__alert--level-3   { background: rgba(220, 38, 38, 0.11); }

.napi-weather-widget__alert-main {
	display: flex;
	align-items: center;
	gap: 9px;
}

.napi-weather-widget__alert-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.napi-weather-widget__alert-texts {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.napi-weather-widget__alert-text {
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1.25;
}

.napi-weather-widget__alert--clear   .napi-weather-widget__alert-text { color: #14532d; }
.napi-weather-widget__alert--warning .napi-weather-widget__alert-text { color: #78350f; }
.napi-weather-widget__alert--level-1 .napi-weather-widget__alert-text { color: #78350f; }
.napi-weather-widget__alert--level-2 .napi-weather-widget__alert-text { color: #7c2d12; }
.napi-weather-widget__alert--level-3 .napi-weather-widget__alert-text { color: #7f1d1d; }

.napi-weather-widget__alert-sub {
	font-size: 11.5px;
	font-weight: 500;
	opacity: 0.85;
}

.napi-weather-widget__alert--clear   .napi-weather-widget__alert-sub { color: #166534; }
.napi-weather-widget__alert--warning .napi-weather-widget__alert-sub { color: #92400e; }
.napi-weather-widget__alert--level-2 .napi-weather-widget__alert-sub { color: #7c2d12; }
.napi-weather-widget__alert--level-3 .napi-weather-widget__alert-sub { color: #7f1d1d; }

.napi-weather-widget__alert-check {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	margin-left: auto;
}

/* ── Törzs ───────────────────────────────────────────────────── */

.napi-weather-widget__body {
	flex: 1;
	min-height: 0;
	padding: 20px 20px 18px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ── Kétoszlopos rács ────────────────────────────────────────── */

.napi-weather-widget__columns {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 20px;
	align-items: center;
}

/* ── Bal oszlop: ikon + hőmérséklet ─────────────────────────── */

.napi-weather-widget__col-main {
	display: flex;
	align-items: center;
	gap: 14px;
}

.napi-weather-widget__icon {
	flex: 0 0 68px;
	width: 68px;
	height: 68px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.84);
	box-shadow: 0 2px 10px rgba(15,23,42,0.09), inset 0 0 0 1px rgba(255,255,255,0.9);
	font-size: 36px;
	overflow: hidden;
}

.napi-weather-widget__icon img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	display: block;
}

.napi-weather-widget__current { min-width: 0; }

.napi-weather-widget__city-link {
	text-decoration: none;
	color: inherit;
}

.napi-weather-widget__city-link:hover .napi-weather-widget__city {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.napi-weather-widget__city {
	display: block;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	color: #0f172a;
	margin-bottom: 2px;
	white-space: nowrap;
}

.napi-weather-widget__temp {
	font-size: 38px;
	line-height: 1;
	font-weight: 900;
	color: #2d6a4f;
	letter-spacing: -1.5px;
	margin-bottom: 4px;
}

.napi-weather-widget__temp-unit {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0;
}

.napi-weather-widget__temp-na {
	font-size: 13px;
	font-weight: 600;
	color: #94a3b8;
}

.napi-weather-widget__desc {
	font-size: 13px;
	color: #334155;
	font-weight: 600;
}

/* ── Jobb oszlop: UV, pollen, napkelte/napnyugta ─────────────── */

.napi-weather-widget__col-extras {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-left: 1px solid rgba(15,23,42,0.09);
	padding-left: 20px;
	align-self: stretch;
	justify-content: center;
}

.napi-weather-widget__extra-row {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	min-height: 20px;
}

.napi-weather-widget__extra-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	width: 16px;
}

.napi-weather-widget__extra-label {
	color: #64748b;
	font-weight: 500;
	flex: 1;
	white-space: nowrap;
}

.napi-weather-widget__extra-value {
	font-weight: 700;
	color: #0f172a;
	display: flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

/* UV érték szín szintek */
.napi-weather-widget__extra-value--uv-low       { color: #16a34a; }
.napi-weather-widget__extra-value--uv-moderate  { color: #ca8a04; }
.napi-weather-widget__extra-value--uv-high      { color: #ea580c; }
.napi-weather-widget__extra-value--uv-very-high { color: #dc2626; }
.napi-weather-widget__extra-value--uv-extreme   { color: #7c3aed; }

/* Badge-ek */
.napi-weather-widget__extra-badge {
	font-size: 10.5px;
	font-weight: 700;
	padding: 1px 8px;
	border-radius: 20px;
	white-space: nowrap;
}

.napi-weather-widget__extra-badge--uv-low       { background: rgba(22,163,74,0.13);  color: #14532d; }
.napi-weather-widget__extra-badge--uv-moderate  { background: rgba(202,138,4,0.18);  color: #78350f; }
.napi-weather-widget__extra-badge--uv-high      { background: rgba(234,88,12,0.16);  color: #7c2d12; }
.napi-weather-widget__extra-badge--uv-very-high { background: rgba(220,38,38,0.14);  color: #7f1d1d; }
.napi-weather-widget__extra-badge--uv-extreme   { background: rgba(124,58,237,0.14); color: #4c1d95; }

.napi-weather-widget__extra-badge--pollen-low      { background: rgba(202,138,4,0.18);  color: #78350f; }
.napi-weather-widget__extra-badge--pollen-medium   { background: rgba(234,88,12,0.16);  color: #7c2d12; }
.napi-weather-widget__extra-badge--pollen-high     { background: rgba(220,38,38,0.14);  color: #7f1d1d; }
.napi-weather-widget__extra-badge--pollen-very_high{ background: rgba(107,29,58,0.14);  color: #6b1d3a; }

/* ── Brand lábléc ────────────────────────────────────────────── */

.napi-weather-widget__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 18px 14px;
	border-top: 1px solid rgba(148, 163, 184, 0.16);
	position: relative;
	z-index: 2;
}

.napi-weather-widget__brand {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	text-decoration: none;
	color: #64748b;
	transition: color 0.15s;
}

.napi-weather-widget__brand:hover { color: #2d6a4f; text-decoration: none; }

.napi-weather-widget__brand-icon { display: flex; align-items: center; flex-shrink: 0; }

.napi-weather-widget__brand-text {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.napi-weather-widget__updated {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 500;
	color: #94a3b8;
	white-space: nowrap;
}

.napi-weather-widget__updated-icon { display: flex; align-items: center; flex-shrink: 0; }

/* ── Loading skeleton (AJAX betöltés közben) ─────────────────── */

@keyframes niw-shimmer {
	0%   { background-position: -800px 0; }
	100% { background-position:  800px 0; }
}

.niw-loading {
	pointer-events: none;
}

.niw-skel-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.niw-skel {
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.12) 25%,
		rgba(255, 255, 255, 0.38) 50%,
		rgba(255, 255, 255, 0.12) 75%
	);
	background-size: 1600px 100%;
	animation: niw-shimmer 1.6s infinite linear;
	border-radius: 8px;
}

.niw-skel--header {
	height: 56px;
	border-radius: 0;
	flex-shrink: 0;
}

.niw-skel-body {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px;
}

.niw-skel-col-left {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.niw-skel--icon {
	flex-shrink: 0;
	width: 68px;
	height: 68px;
	border-radius: 18px;
}

.niw-skel-lines {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.niw-skel--city  { height: 14px; width: 100px; }
.niw-skel--temp  { height: 38px; width: 80px; }
.niw-skel--desc  { height: 12px; width: 110px; }

.niw-skel-col-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-left: 1px solid rgba(15, 23, 42, 0.09);
	padding-left: 20px;
}

.niw-skel--extra { height: 16px; width: 100%; }

.niw-skel--footer {
	height: 44px;
	border-radius: 0 0 24px 24px;
	flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   Layout 2 – Széles vízszintes banner
   Struktúra: [figyelmeztetés] | [ikon + hőm.] | [4 extra kártya] | [lábléc]
   Ajánlott: 800–1100 px szélességű tartalomba.
   ══════════════════════════════════════════════════════════════ */

.napi-weather-widget--layout-2 {
	max-width: 100%;
	height: auto;
	min-height: 110px;
	flex-direction: row;
	align-items: stretch;
	border-radius: 16px;
}

/* ── Alert: bal panel ─────────────────────────────────────── */

.napi-weather-widget--layout-2 .napi-weather-widget__alert {
	flex: 0 0 auto;
	min-width: 175px;
	max-width: 235px;
	border-bottom: none;
	border-right: 1px solid rgba(15, 23, 42, 0.07);
	display: flex;
	align-items: center;
	padding: 14px 16px;
	position: relative;
	overflow: hidden;
}

/* Háttér időjárás vízjel */
.napi-weather-widget--layout-2 .napi-weather-widget__alert::after {
	content: '';
	position: absolute;
	right: -6px;
	bottom: -6px;
	width: 76px;
	height: 76px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'%3E%3Cpath d='M12 36c-4 0-7-3.1-7-7 0-3.3 2.3-6.1 5.5-6.8.3-4.6 4.1-8.2 8.8-8.2 3.5 0 6.5 2 8 5 .4-.1.9-.2 1.4-.2 3.7 0 6.3 2.9 6.3 6.3 0 .2 0 .4-.1.6L12 36z' fill='%23d97706' opacity='0.35'/%3E%3Cpath d='M24 22l-4 8h8l-4 8' stroke='%23d97706' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.45'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	opacity: 0.22;
	pointer-events: none;
}

/* "nincs riasztás" alcím rejtett, esemény-alcím (pl. Zivatar) látható */
.napi-weather-widget--layout-2 .napi-weather-widget__alert-sub--clear {
	display: none;
}

.napi-weather-widget--layout-2 .napi-weather-widget__alert-sub--events {
	font-size: 11px;
	font-weight: 700;
}

.napi-weather-widget--layout-2 .napi-weather-widget__alert-text {
	font-size: 12.5px;
	font-weight: 700;
}

.napi-weather-widget--layout-2 .napi-weather-widget__alert-icon svg {
	width: 24px;
	height: 24px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__alert-check svg {
	width: 17px;
	height: 17px;
}

/* ── Body: ikon + hőmérséklet | extra kártyák ────────────── */

.napi-weather-widget--layout-2 .napi-weather-widget__body {
	flex: 1;
	padding: 10px 14px;
	justify-content: center;
}

/* Grid → flex sor: col-main bal, col-extras jobb */
.napi-weather-widget--layout-2 .napi-weather-widget__columns {
	display: flex;
	flex-direction: row;
	gap: 0;
	align-items: center;
	height: 100%;
}

/* Ikon + városblokk */
.napi-weather-widget--layout-2 .napi-weather-widget__col-main {
	flex: 0 0 auto;
	padding: 8px 26px 8px 8px;
	border-right: 1px solid rgba(15, 23, 42, 0.08);
	gap: 12px;
	align-self: center;
}

.napi-weather-widget--layout-2 .napi-weather-widget__icon {
	flex-basis: 64px;
	width: 64px;
	height: 64px;
	border-radius: 16px;
	font-size: 34px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__icon img {
	width: 56px;
	height: 56px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__city {
	font-size: 18px;
	font-weight: 800;
	margin-bottom: 1px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__temp {
	font-size: 38px;
	margin-bottom: 2px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__temp-unit {
	font-size: 25px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__desc {
	font-size: 13px;
}

/* Extra adatok: vízszintes sor fehér kártyákkal ─────────── */

.napi-weather-widget--layout-2 .napi-weather-widget__col-extras {
	flex: 1;
	display: flex;
	flex-direction: row;
	gap: 8px;
	padding: 10px 16px;
	border-left: none;
	align-items: stretch;
	justify-content: center;
	align-self: stretch;
}

/* Minden extra-row = önálló fehér kártya */
.napi-weather-widget--layout-2 .napi-weather-widget__extra-row {
	flex: 1;
	max-width: 96px;
	min-width: 64px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 4px;
	padding: 9px 8px;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 12px;
	box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08),
	            inset 0 0 0 1px rgba(255, 255, 255, 0.9);
	font-size: 12px;
	min-height: 0;
}

.napi-weather-widget--layout-2 .napi-weather-widget__extra-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.napi-weather-widget--layout-2 .napi-weather-widget__extra-icon svg {
	width: 22px;
	height: 22px;
}

.napi-weather-widget--layout-2 .napi-weather-widget__extra-label {
	flex: none;
	font-size: 10px;
	font-weight: 500;
	color: #64748b;
	white-space: nowrap;
}

/* Érték + badge egymás alatt */
.napi-weather-widget--layout-2 .napi-weather-widget__extra-value {
	font-size: 15px;
	font-weight: 800;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
	color: #0f172a;
}

.napi-weather-widget--layout-2 .napi-weather-widget__extra-badge {
	font-size: 9px;
	padding: 1px 7px;
}

/* Layout 2: UV badge (Mérsékelt / Magas / stb.) rejtve – csak a szám jelenik meg,
   így mind a 4 extra kártya azonos számú sort tartalmaz. */
.napi-weather-widget--layout-2 [class*="extra-badge--uv-"] {
	display: none;
}

/* ── Footer: jobb panel ──────────────────────────────────── */

.napi-weather-widget--layout-2 .napi-weather-widget__footer {
	flex: 0 0 auto;
	min-width: 145px;
	border-top: none;
	border-left: 1px solid rgba(148, 163, 184, 0.16);
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 5px;
	padding: 14px 18px;
}

/* ══════════════════════════════════════════════════════════════
   Layout 3 – Oldalsáv  (max 150 px széles, portrait / álló)
   Ajánlott: WordPress oldalsávba (sidebar widget area),
   szélességben korlátozott helyekre.
   ══════════════════════════════════════════════════════════════ */

.napi-weather-widget--layout-3 {
	max-width: 150px;
	width: 150px;
	height: auto;
	border-radius: 20px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__alert {
	padding: 8px 10px 7px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__alert-sub--clear,
.napi-weather-widget--layout-3 .napi-weather-widget__alert-sub--events {
	display: none;
}

.napi-weather-widget--layout-3 .napi-weather-widget__alert-text {
	font-size: 10px;
	font-weight: 700;
}

.napi-weather-widget--layout-3 .napi-weather-widget__alert-icon svg {
	width: 18px;
	height: 18px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__alert-check svg {
	width: 14px;
	height: 14px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__body {
	padding: 12px 10px 10px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__columns {
	grid-template-columns: 1fr;
	gap: 10px 0;
}

.napi-weather-widget--layout-3 .napi-weather-widget__col-main {
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 5px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__icon {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 13px;
	font-size: 28px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__icon img {
	width: 44px;
	height: 44px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__city {
	font-size: 11.5px;
	font-weight: 800;
	white-space: normal;
	overflow-wrap: break-word;
	text-align: center;
	margin-bottom: 1px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__temp {
	font-size: 28px;
	letter-spacing: -1px;
	margin-bottom: 2px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__temp-unit {
	font-size: 18px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__desc {
	font-size: 10.5px;
	text-align: center;
}

.napi-weather-widget--layout-3 .napi-weather-widget__col-extras {
	border-left: none;
	border-top: 1px solid rgba(15, 23, 42, 0.09);
	padding-left: 0;
	padding-top: 9px;
	gap: 9px;
}

/* Layout 3: extra sorok 2-soros grid – ikon bal oszlop, felirat+érték jobb */
.napi-weather-widget--layout-3 .napi-weather-widget__extra-row {
	display: grid;
	grid-template-columns: 18px 1fr;
	grid-template-rows: auto auto;
	gap: 1px 5px;
	align-items: start;
	min-height: 0;
}

.napi-weather-widget--layout-3 .napi-weather-widget__extra-icon {
	grid-column: 1;
	grid-row: 1 / 3;
	align-self: center;
	width: 16px;
	height: 16px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__extra-label {
	grid-column: 2;
	grid-row: 1;
	flex: none;
	font-size: 9.5px;
	font-weight: 500;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.napi-weather-widget--layout-3 .napi-weather-widget__extra-value {
	grid-column: 2;
	grid-row: 2;
	font-size: 12px;
	font-weight: 700;
	white-space: normal;
	flex-wrap: wrap;
	gap: 2px;
	line-height: 1.3;
	color: #0f172a;
}

.napi-weather-widget--layout-3 .napi-weather-widget__extra-badge {
	font-size: 9px;
	padding: 1px 5px;
}

.napi-weather-widget--layout-3 .napi-weather-widget__footer {
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 7px 10px 9px;
}

/* Oldalsávban a hullám ikon elrejtve, hogy a link egy sorba férjen */
.napi-weather-widget--layout-3 .napi-weather-widget__brand-icon {
	display: none;
}

.napi-weather-widget--layout-3 .napi-weather-widget__brand-text {
	font-size: 9px;
	letter-spacing: 0.02em;
}

.napi-weather-widget--layout-3 .napi-weather-widget__updated {
	font-size: 9px;
	justify-content: center;
	text-align: center;
	flex-wrap: wrap;
}

/* ── Reszponzív ──────────────────────────────────────────────── */

@media (max-width: 420px) {
	.napi-weather-widget {
		border-radius: 20px;
		height: auto;
	}

	.napi-weather-widget__body {
		padding: 16px 14px 14px;
	}

	.napi-weather-widget__columns {
		grid-template-columns: 1fr;
		gap: 14px 0;
	}

	.napi-weather-widget__col-extras {
		border-left: none;
		border-top: 1px solid rgba(15,23,42,0.08);
		padding-left: 0;
		padding-top: 12px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px 12px;
	}

	.napi-weather-widget__icon { flex-basis: 58px; width: 58px; height: 58px; }
	.napi-weather-widget__temp { font-size: 32px; }
	.napi-weather-widget__temp-unit { font-size: 21px; }

	.napi-weather-widget__footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		padding: 10px 14px 12px;
	}
}
