/* ABOUTME: Utility classes, help panels, tooltips, error dialogs, and debug styles. */
/* ABOUTME: Also includes accessibility helpers, spacing utilities, room-type table, and bed tally. */

.help-panel {
	background-color: #cff4fc;
	border: 1px solid #9eeaf9;
	padding: 1rem;
	border-radius: 3px;
	line-height: 1.2;
	font-size: 90%;
}

/* Mobile base: horizontal layout with compact padding */
.help-text {
	text-align: left;
	flex-direction: row;
	padding: 1rem;
	gap: 1rem;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: bold;
}

.help-text svg {
	width: 3rem;
	height: 3rem;
	margin-bottom: 1rem;
}

/* Tooltip */
[data-tooltip]:hover::after {
	display: block;
	position: absolute;
	content: attr(data-tooltip);
	border: 1px solid black;
	background: #eee;
	padding: 0.25em;
}

/* Error dialog */
.error-dialog {
	max-width: 520px;
	width: min(92vw, 520px);
	border: 1px solid #e33;
	border-radius: 8px;
	padding: 16px 18px;
}

.error-dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.error-dialog h3 {
	margin: 0 0 8px;
	color: #b00020;
	font-size: 1.1rem;
}

.error-dialog ul {
	margin: 8px 0 16px;
	padding-left: 20px;
	color: #b00020;
}

.error-dialog .button {
	padding: 8px 14px;
}

/* Debug helper */
#debug_helper {
	display: none;
	position: relative;
	left: 0px;
	z-index: 9999;
	background: var(--color-dark-blue);
	border: 1px solid #333333;
	color: white;
	padding: var(--general-padding);
	overflow-y: scroll;
	max-height: 100%;
	border-radius: 5px;
	font-size: 80%;
	width: 100%;
	margin-top: 100px;
}

/* Accessibility */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Text alignment utilities */
.text-right {
	text-align: right;
}

.text-center {
	text-align: center;
}

/* Spacing utilities */
.mt-1 {
	margin-top: 0.5rem;
}

.mt-2 {
	margin-top: 1rem;
}

.mb-1 {
	margin-bottom: 0.5rem;
}

.mb-2 {
	margin-bottom: 1rem;
}

.ml-1 {
	margin-left: 0.5rem;
}

/* Room type table (large groups) */
.room-type-table {
	width: 100%;
	border-collapse: collapse;
}

.room-type-table th,
.room-type-table td {
	padding: 0.4rem 0.5rem;
	border-bottom: 1px solid #ddd;
}

.room-type-table thead th {
	text-align: left;
	font-weight: 600;
}

.room-type-table tfoot {
	background: #eee;
	font-weight: 600;
}

/* Bed tally status below table */
.bed-tally {
	margin: 0.5rem 0 0;
	padding: 0.4rem 0.6rem;
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 500;
}

.bed-tally--short {
	background: #fff3cd;
	color: #664d03;
}

.bed-tally--exact {
	background: #d1e7dd;
	color: #0a3622;
}

.bed-tally--over {
	background: #f8d7da;
	color: #58151c;
}

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

@media screen and (min-width: 1024px) {
	.help-text {
		text-align: center;
		flex-direction: column;
		padding: 1rem 4rem;
		gap: 0;
	}
}
