/* ABOUTME: Room choice cards, room manager, and scrollable panel styles. */
/* ABOUTME: Handles room selection UI with images, attributes, and scroll indicators. */

.room-manager {
	display: flex;
	gap: 10px;
}

.room-manager > * {
	width: 100%;
}

.room-people div {
	border-top: 1px solid;
	padding-top: 0.3rem;
	display: flex;
	align-items: center;
}

.room-people div label:first-child {
	display: flex;
	flex-direction: column;
}

.room-people div label:last-child {
	width: 100%;
}

.room-attributes {
	display: flex;
	gap: 1rem;
}

.room-icon {
	display: inline-flex;
	gap: 0.3rem;
	width: fit-content;
	padding: 0.3rem;
	border-radius: 3px;
	background: var(--color-light-turquoise);
}

.room-icon span {
	font-size: 1.2rem;
}

.attribute {
	display: inline-flex;
	gap: 0.3rem;
	width: fit-content;
	justify-content: center;
	align-items: center;
}

.attribute img {
	max-height: 1rem;
}

/* Mobile base: no fixed heights, natural overflow */
.form-content,
#form-summary,
.room-choices-wrapper,
.scrollable-panel {
	min-height: auto;
	max-height: none;
	overflow-y: visible;
}

.room-choices {
	display: flex;
	flex-wrap: wrap;
}

/* Scroll fade indicators (applied on all sizes, visible when scrollable) */
.form-content,
.room-choices-wrapper,
.scrollable-panel {
	background:
		linear-gradient(white 30%, rgba(255, 255, 255, 0)) center top,
		linear-gradient(rgba(255, 255, 255, 0), white 70%) center bottom,
		radial-gradient(
				farthest-side at 50% 0,
				rgba(0, 0, 0, 0.4),
				rgba(0, 0, 0, 0)
			)
			center top,
		radial-gradient(
				farthest-side at 50% 100%,
				rgba(0, 0, 0, 0.4),
				rgba(0, 0, 0, 0)
			)
			center bottom;
	background-repeat: no-repeat;
	background-size:
		100% 40px,
		100% 40px,
		100% 14px,
		100% 14px;
	background-attachment: local, local, scroll, scroll;
	background-color: white;
}

/* Mobile base: stacked room cards with full-width images */
.room-choice {
	border-bottom: 1px solid;
	width: 100%;
	padding: var(--general-padding);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.room-choice:last-child {
	border-bottom: 0px;
}

.room-choice-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	overflow: hidden;
	object-fit: cover;
}

.room-choice-data {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.room-choice-header {
	display: flex;
	justify-content: space-between;
	width: 100%;
}

.room-choice-header span {
	background-color: var(--color-light-turquoise);
	padding: 0.5rem;
	border-radius: 3px;
	font-size: 1rem;
	font-weight: bold;
	width: fit-content;
}

.room-choice-header strong {
	flex-grow: 1;
}

.room-choice-desc {
	height: 100%;
}

.room-choice-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* --- Room cards side-by-side (>=600px) --- */

@media screen and (min-width: 600px) {
	.room-choice {
		flex-direction: row;
	}

	.room-choice-image img {
		width: 200px;
		float: left;
	}

	.room-choice-footer {
		flex-wrap: nowrap;
	}
}

/* --- Desktop (>=1024px) --- */

@media screen and (min-width: 1024px) {
	.room-icon span {
		font-size: 1.5rem;
	}

	/* Fixed height scroll panels on desktop */
	.form-content,
	#form-summary,
	.room-choices-wrapper,
	.scrollable-panel {
		min-height: 500px;
		max-height: calc(100vh - 240px);
		overflow-y: scroll;
	}

	.room-choice-header span {
		font-size: 1.1rem;
	}
}

/* --- Narrow mobile (<=400px) --- */

@media screen and (max-width: 400px) {
	.room-choice-footer {
		flex-direction: column;
		align-items: stretch;
	}
}
