#seatmap {
	background: url('../images/seatmap.png') no-repeat;
	text-align: center;
	margin: 0 auto;
	/* Prevent baseline whitespace affecting height */
	line-height: 0;
	/* Size is controlled by CSS variables set on the #seatmap element */
	width: calc(var(--seatmap-cols, 0) * 24px);
	height: calc(var(--seatmap-rows, 0) * 24px);
	position: relative;
}

/* Ensure the #seatmap container wraps the floated seat boxes */
#seatmap:after {
	content: "";
	display: block;
	clear: both;
}

/* Keep the clickable area full-size in admin */
#seatmap input[type="checkbox"] {
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	cursor: pointer;
}

/* Default seat box sizing (outer size must be exactly 24x24) */
span.seat_1, span.seat_2, span.seat_3, span.seat_4, span.admin_seat {
	box-sizing: border-box;
	border: 1px solid #000;
	text-align: center;
	font-weight: bold;
	display: block;
	height: 24px;
	width: 24px;
	float: left;
	position: relative;
	line-height: 22px;
	overflow: visible;
	background-color: #C03;
}

/* Available */
span.seat_2 {
	background-color: #09C;
}

/* Hidden in public view (used to reveal the background image) */
span.seat_3 {
	background: none;
	border: 0;
}

/* Disabled (ikke reserverbar) */
span.seat_4 {
	background-color: #888;
}

/* Admin seats are always visible and clickable (also when type=3) */
span.admin_seat {
	border: 1px solid #000;
}

span.admin_seat.seat_3 {
	border: 1px solid #000;
	background: none;
}

span.admin_seat input[type="checkbox"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
}

a.taken {
	position: relative;
	z-index: 24;
}

a.taken:hover {
	z-index: 25;
}

a.taken span.navn {
	position: absolute;
	display: none;
	width: 270px;
	padding: 5px;
	float: left;
	left: 50px;
	top: 20px;
}

a.taken:hover span.navn {
	background-color: #0099cc;
	border: 1px solid #000;
	text-align: center;
	position: absolute;
	display: block;
	width: 180px;
	color: #000;
	left: 2em;
	top: 2em;
}

/* Seat alias displayed inside the seat box */
#seatmap .seatbox-alias {
	font-weight: normal !important;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	font-size: 9px !important;
	padding: 0 2px !important;
	line-height: 1 !important;
	white-space: nowrap !important;
	text-align: center !important;
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(0,0,0,0.85) !important;
	z-index: 2;
}

/* Prevent any legacy alias elements outside the seat box */
.seat-link-alias, .seatbox-alias-outside {
	display: none !important;
}

/* Hide legacy right-side username element (tooltip JS handles hover) */
#seatmap .navn {
	display: none !important;
}

/* Modal for sete-tildeling (admin) */
.seatmap-modal-backdrop {
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.45);
	display: none;
	z-index: 10000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.seatmap-modal {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
	width: 520px;
	max-width: 100%;
	padding: 14px 16px;
	line-height: 1.3;
}

.seatmap-modal h3 {
	margin: 0 0 10px 0;
	font-size: 1.1em;
}

.seatmap-modal .seatmap-modal-row {
	margin: 8px 0;
}

.seatmap-modal input[type="text"] {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
}

.seatmap-modal .seatmap-results {
	border: 1px solid #ccc;
	border-radius: 6px;
	max-height: 220px;
	overflow: auto;
	margin-top: 6px;
}

.seatmap-modal .seatmap-result {
	padding: 6px 8px;
	cursor: pointer;
	border-bottom: 1px solid #eee;
}

.seatmap-modal .seatmap-result:last-child {
	border-bottom: 0;
}

.seatmap-modal .seatmap-result:hover {
	background: #f5f5f5;
}

.seatmap-modal .seatmap-result.selected {
	background: #e6f4ff;
}

.seatmap-modal .seatmap-modal-actions {
	margin-top: 12px;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.seatmap-modal button {
	padding: 7px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}

.seatmap-modal button.primary {
	background: #0099cc;
	color: #fff;
	border-color: #0099cc;
}

.seatmap-modal button.danger {
	background: #c0392b;
	color: #fff;
	border-color: #c0392b;
}

.seatmap-modal .seatmap-modal-error {
	color: #b00020;
	margin-top: 8px;
	min-height: 18px;
}


/* Seatmap messages (ticket gate / disabled) */
.seatmap-alert{margin:12px auto;max-width:760px;background:#fff7f7;border:2px solid #b00;padding:12px 14px;border-radius:6px;text-align:center;}
.seatmap-alert a{color:#0b62a4;text-decoration:underline;}
