/**
 * Casa Terra Shade by hour (Figma "V5 Signature · Shade by hour"): four hour columns (time,
 * 282 × 262 plan, "% in shade"), then the legend and the source. Four columns on desktop; a
 * horizontal scroll row on tablet and phone (Figma "Scroll row · Shade").
 */

.ct-shade__hours {
	gap: 24px;
}

.ct-shade__hour {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ct-shade__plan {
	margin-top: 8px;
	aspect-ratio: 282 / 262;
}

.ct-shade__value {
	margin-top: 12px;
	font-size: 18px;
	line-height: 28px;
}

/* Legend left, source right on one line (desktop). */
.ct-shade__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 24px;
	font-size: var(--ct-fs-small);
	line-height: var(--ct-lh-small);
}

.ct-shade__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.ct-shade__key {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ct-shade__swatch {
	flex: none;
	width: 20px;
	height: 14px;
	border: 1px solid var(--ct-c-line);
	border-radius: 2px;
}

.ct-shade__swatch--sun {
	background: var(--ct-shade-sun, var(--ct-c-cream));
}

.ct-shade__swatch--shade {
	background: var(--ct-shade-shade, var(--ct-c-muted));
}

.ct-shade__swatch--pool {
	background: var(--ct-shade-pool, var(--ct-c-sand));
}

.ct-shade__source {
	max-width: 560px;
	color: var(--ct-muted);
	text-align: right;
}

/* Desktop: four columns, no scrolling. */
@media (min-width: 1025px) {
	.ct-shade .ct-shade__hours {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		margin-inline: 0;
		padding-inline: 0;
		overflow: visible;
	}
}

/* Tablet and phone: 282 wide columns in a scroll row, the source under the legend. */
@media (max-width: 1024px) {
	.ct-shade__hour {
		width: 282px;
	}

	.ct-shade__foot {
		flex-direction: column;
		align-items: flex-start;
	}

	.ct-shade__source {
		max-width: none;
		text-align: left;
	}
}

@media (max-width: 767px) {
	.ct-shade .ct-shade__hours {
		gap: 16px;
	}

	.ct-shade__foot {
		margin-top: 20px;
	}

	.ct-shade__legend {
		gap: 8px 16px;
	}
}
