/**
 * Font del Bosc — El Temps
 * Stylesheet for the weather views. BEM naming, prefixed .fdb-.
 */

.fdb-weather {
	--fdb-bg: #ffffff;
	--fdb-fg: #1c2430;
	--fdb-muted: #5a6572;
	--fdb-accent: #0b6bcb;
	--fdb-warm: #d97706;
	--fdb-cold: #0284c7;
	--fdb-border: #e2e8f0;
	--fdb-bar-max: #f59e0b;
	--fdb-bar-min: #38bdf8;

	box-sizing: border-box;
	max-width: 100%;
	padding: 1rem;
	border: 1px solid var(--fdb-border);
	border-radius: 12px;
	background: var(--fdb-bg);
	color: var(--fdb-fg);
	font-size: 0.95rem;
	line-height: 1.4;
}

.fdb-weather *,
.fdb-weather *::before,
.fdb-weather *::after {
	box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
	.fdb-weather {
		--fdb-bg: #141a22;
		--fdb-fg: #e5eaf0;
		--fdb-muted: #97a3b0;
		--fdb-border: #2a3440;
	}
}

.fdb-weather__title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.fdb-icon {
	display: block;
	width: 48px;
	height: 48px;
}

.fdb-icon--lg {
	width: 96px;
	height: 96px;
}

.fdb-attribution {
	margin: 0.75rem 0 0;
	font-size: 0.7rem;
	color: var(--fdb-muted);
}

.fdb-unavailable {
	margin: 0;
	color: var(--fdb-muted);
}

/* Current conditions */

.fdb-current__main {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.fdb-current__temp {
	font-size: 2.6rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.fdb-current__label {
	margin: 0.25rem 0 0.5rem;
	color: var(--fdb-muted);
}

.fdb-current__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--fdb-muted);
}

/* Hourly forecast */

.fdb-hourly__scroll {
	display: flex;
	gap: 0.25rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	-webkit-overflow-scrolling: touch;
}

.fdb-hourly__item {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	min-width: 64px;
	padding: 0.5rem 0.25rem;
	border-radius: 8px;
	text-align: center;
}

.fdb-hourly__time {
	font-size: 0.75rem;
	color: var(--fdb-muted);
}

.fdb-hourly__temp {
	font-size: 1.05rem;
	font-weight: 700;
}

.fdb-hourly__pop {
	font-size: 0.75rem;
	color: var(--fdb-cold);
}

.fdb-hourly__wind {
	font-size: 0.7rem;
	color: var(--fdb-muted);
}

.fdb-hourly__icon-placeholder {
	display: block;
	width: 48px;
	height: 48px;
}

/* Daily forecast */

.fdb-daily__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
	gap: 0.5rem;
}

.fdb-daily__day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	padding: 0.5rem 0.25rem;
	border: 1px solid var(--fdb-border);
	border-radius: 8px;
	text-align: center;
}

.fdb-daily__name {
	font-size: 0.8rem;
	font-weight: 600;
}

.fdb-daily__date {
	font-size: 0.7rem;
	color: var(--fdb-muted);
}

.fdb-daily__temps {
	display: flex;
	gap: 0.5rem;
	margin: 0;
}

.fdb-daily__max {
	color: var(--fdb-warm);
	font-weight: 700;
}

.fdb-daily__min {
	color: var(--fdb-cold);
	font-weight: 700;
}

.fdb-daily__pop,
.fdb-daily__wind {
	margin: 0;
	font-size: 0.75rem;
	color: var(--fdb-muted);
}

/* Historical chart */

.fdb-historical__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	color: var(--fdb-muted);
	font-size: 0.85rem;
}

.fdb-historical__chart {
	display: flex;
	gap: 2px;
	height: 180px;
	align-items: flex-end;
}

.fdb-historical__col {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
	height: 100%;
}

.fdb-historical__bars {
	display: flex;
	gap: 1px;
	align-items: flex-end;
	height: calc(100% - 1.25rem);
}

.fdb-historical__bar {
	flex: 1 1 0;
	min-height: 2px;
	border-radius: 2px 2px 0 0;
}

.fdb-historical__bar--max {
	background: var(--fdb-bar-max);
}

.fdb-historical__bar--min {
	background: var(--fdb-bar-min);
}

.fdb-historical__day {
	height: 1.25rem;
	font-size: 0.65rem;
	color: var(--fdb-muted);
	text-align: center;
	overflow: hidden;
	white-space: nowrap;
}
