.wld-weather {
	--wld-bg: #f8fafc;
	--wld-card-bg: #ffffff;
	--wld-border: #e2e8f0;
	--wld-text: #1e293b;
	--wld-muted: #64748b;
	--wld-accent: #0ea5e9;
	--wld-radius: 10px;
	--wld-gap: 12px;

	font-family: inherit;
	color: var(--wld-text);
	margin: 1.5em 0;
}

.wld-weather__title {
	margin: 0 0 1em;
	font-size: 1.25rem;
	font-weight: 600;
}

.wld-weather__grid {
	display: grid;
	grid-template-columns: repeat(var(--wld-columns, 3), 1fr);
	gap: var(--wld-gap);
}

@media (max-width: 768px) {
	.wld-weather__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.wld-weather__grid {
		grid-template-columns: 1fr;
	}
}

.wld-weather__card {
	background: var(--wld-card-bg);
	border: 1px solid var(--wld-border);
	border-radius: var(--wld-radius);
	padding: 1em 1.1em;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	transition: box-shadow 0.2s ease;
}

.wld-weather__card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wld-weather__card--temperature { border-left: 3px solid #f97316; }
.wld-weather__card--humidity    { border-left: 3px solid #06b6d4; }
.wld-weather__card--wind        { border-left: 3px solid #8b5cf6; }
.wld-weather__card--pressure    { border-left: 3px solid #6366f1; }
.wld-weather__card--solar       { border-left: 3px solid #eab308; }
.wld-weather__card--rain        { border-left: 3px solid #3b82f6; }

.wld-weather__label {
	font-size: 0.8rem;
	color: var(--wld-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	flex-wrap: wrap;
}

.wld-help {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: help;
	vertical-align: middle;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1;
}

.wld-help__icon {
	font-size: 0.95em;
	line-height: 1;
}

.wld-help__tooltip {
	position: absolute;
	z-index: 20;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	min-width: 180px;
	max-width: 260px;
	padding: 0.55em 0.75em;
	border-radius: 8px;
	background: #1e293b;
	color: #f8fafc;
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.35;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	text-align: left;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, visibility 0.15s ease;
}

.wld-help__tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1e293b;
}

.wld-help:hover .wld-help__tooltip,
.wld-help:focus .wld-help__tooltip,
.wld-help:focus-within .wld-help__tooltip {
	opacity: 1;
	visibility: visible;
}

.wld-weather__value {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	transition: opacity 0.2s ease;
}

.wld-weather--refreshing .wld-weather__value,
.wld-weather--refreshing [data-wld-field] {
	opacity: 0.65;
}

.wld-weather__table {
	width: 100%;
	border-collapse: collapse;
	background: var(--wld-card-bg);
	border: 1px solid var(--wld-border);
	border-radius: var(--wld-radius);
	overflow: hidden;
}

.wld-weather__table th,
.wld-weather__table td {
	padding: 0.65em 1em;
	text-align: left;
	border-bottom: 1px solid var(--wld-border);
}

.wld-weather__table tr:last-child th,
.wld-weather__table tr:last-child td {
	border-bottom: none;
}

.wld-weather__table th {
	font-weight: 500;
	color: var(--wld-muted);
	width: 50%;
}

.wld-weather__list {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--wld-card-bg);
	border: 1px solid var(--wld-border);
	border-radius: var(--wld-radius);
}

.wld-weather__list li {
	padding: 0.65em 1em;
	border-bottom: 1px solid var(--wld-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wld-weather__list li:last-child {
	border-bottom: none;
}

.wld-weather__inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	padding: 0.75em 1em;
	background: var(--wld-card-bg);
	border: 1px solid var(--wld-border);
	border-radius: var(--wld-radius);
}

.wld-weather__separator {
	color: var(--wld-muted);
}

.wld-weather__updated {
	margin: 0.75em 0 0;
	font-size: 0.8rem;
	color: var(--wld-muted);
}

.wld-weather__more {
	margin: 0.75em 0 0;
	font-size: 0.875rem;
	text-align: right;
}

.wld-weather__more-link {
	color: var(--wld-accent);
	text-decoration: none;
	font-weight: 500;
}

.wld-weather__more-link:hover,
.wld-weather__more-link:focus {
	text-decoration: underline;
}

.wld-weather--error {
	padding: 1em;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--wld-radius);
	color: #991b1b;
}

.wld-weather--error p {
	margin: 0;
}
