/*
 * PW Weather for Elementor — style widgetu.
 * Autor: Patryk Wojewoda
 * Wszystkie selektory są izolowane prefiksem .pw-weather.
 */

.pw-weather {
	--pw-weather-accent: #1976d2;
	--pw-weather-text: inherit;
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	border: 2px solid var(--pw-weather-accent);
	border-radius: 10px;
	background-color: color-mix(in srgb, var(--pw-weather-accent) 10%, transparent);
	color: var(--pw-weather-text);
	padding: 14px 18px 22px;
}

.pw-weather--warning {
	--pw-weather-accent: #f5a800;
}

.pw-weather--danger {
	--pw-weather-accent: #d32f2f;
}

.pw-weather--notice {
	--pw-weather-accent: #9e9e9e;
	border-style: dashed;
}

.pw-weather__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--pw-weather-accent);
}

.pw-weather__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.pw-weather__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}

.pw-weather__title {
	font-weight: 700;
	line-height: 1.3;
	color: var(--pw-weather-accent);
	overflow-wrap: anywhere;
}

.pw-weather__location {
	font-weight: 500;
}

.pw-weather__desc {
	font-size: 0.9em;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.pw-weather__temp {
	flex: 0 0 auto;
	font-size: 1.5em;
	font-weight: 700;
	color: var(--pw-weather-accent);
	white-space: nowrap;
}

.pw-weather__credit {
	position: absolute;
	right: 10px;
	bottom: 4px;
	font-size: 10px;
	line-height: 1;
	opacity: 0.65;
}

.pw-weather__credit a {
	color: inherit;
	text-decoration: underline;
}

/* Układ: karta */
.pw-weather--card {
	flex-direction: column;
	text-align: center;
	max-width: 340px;
	padding: 24px 20px 26px;
	gap: 10px;
}

.pw-weather--card .pw-weather__icon {
	width: 72px;
	height: 72px;
}

.pw-weather--card .pw-weather__temp {
	font-size: 2em;
}

.pw-weather--card .pw-weather__credit {
	right: 0;
	left: 0;
	text-align: center;
}

/* Responsywność paska na wąskich ekranach */
@media (max-width: 520px) {
	.pw-weather--banner {
		flex-wrap: wrap;
	}

	.pw-weather--banner .pw-weather__temp {
		order: -1;
		margin-inline-start: auto;
	}
}

/* RTL */
[dir="rtl"] .pw-weather__credit {
	right: auto;
	left: 10px;
}
