.esm-bookings-wrap { max-width: 1200px; }

.esm-bookings-filter {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 18px;
	flex-wrap: wrap;
}
.esm-bookings-filter select {
	padding: 6px 30px 6px 10px;
	border-radius: 5px;
	border: 1px solid #ccd0d4;
	min-width: 180px;
}
#esm-bookings-search {
	flex: 0 0 280px;
	padding: 6px 10px;
	border-radius: 5px;
	border: 1px solid #ccd0d4;
}

.esm-summary-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 22px;
}
.esm-summary-card {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 16px 22px;
	display: flex;
	flex-direction: column;
	min-width: 140px;
	flex: 1 1 140px;
}
.esm-summary-num {
	font-size: 24px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.3;
}
.esm-summary-label {
	font-size: 12px;
	color: #757575;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.esm-event-group-title {
	margin-top: 28px;
	margin-bottom: 8px;
	font-size: 16px;
	padding-bottom: 6px;
	border-bottom: 2px solid #2271b1;
	display: inline-block;
}

.esm-bookings-table {
	border-collapse: collapse;
	margin-bottom: 10px;
}.esm-bookings-table th {
	text-align: left;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: #666;
	padding: 10px 12px;
}
.esm-bookings-table td {
	padding: 10px 12px;
	vertical-align: top;
	font-size: 13.5px;
}
.esm-bookings-table tbody tr:hover { background: #f6f8fb; }

.esm-seats-cell { max-width: 260px; }
.esm-seat-chip {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
	margin: 0 4px 4px 0;
	color: #fff;
	background: #4fa3d1;
}
.esm-cat-vip { background: #e05252; }
.esm-cat-reserved { background: #9a9a9a; }
.esm-cat-standing { background: #2fa77e; }
.esm-zone-chip { background: #b48ee0; }
.esm-no-seats { color: #999; }

.esm-badge {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
}
.esm-badge-paid { background: #e5f5ea; color: #1a7a3d; }
.esm-badge-pending { background: #fff3d6; color: #8a5a00; }
.esm-badge-cancelled { background: #f1f1f1; color: #777; }

.esm-no-bookings {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 30px;
	text-align: center;
	color: #777;
}

.esm-confirmation-page-note {
	font-size: 13px;
	color: #666;
	max-width: 700px;
}
.esm-checked-in-by { display: block; font-size: 10.5px; color: #888; margin-top: 2px; }
.esm-checked-in-badge {
	display: inline-block;
	background: #e5f5ea;
	color: #1a7a3d;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
}
.esm-not-arrived {
	color: #999;
	font-size: 12px;
}

.esm-portal-notice {
	background: #f0f6fc;
	border: 1px solid #cfe0ee;
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 13px;
	max-width: 640px;
}
.esm-portal-notice p { margin: 0 0 6px; }
.esm-portal-notice p:last-child { margin-bottom: 0; }
.esm-portal-notice code {
	background: #fff;
	border: 1px solid #cfe0ee;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 13px;
}
.esm-portal-notice-sub { color: #555; font-size: 12.5px; }

.esm-scan-qr-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 18px;
}
.esm-scan-qr-btn svg { flex: 0 0 auto; }

.esm-scanner-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.65);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.esm-scanner-box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 24px;
	width: 420px;
	max-width: 92vw;
	text-align: center;
}
.esm-scanner-box h2 { margin-top: 0; }
.esm-scanner-close {
	position: absolute;
	top: 10px;
	right: 14px;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}
.esm-scanner-video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}
.esm-scanner-video-wrap video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.esm-scanner-frame {
	position: absolute;
	inset: 15%;
	border: 3px solid rgba(255,255,255,.85);
	border-radius: 12px;
	pointer-events: none;
	box-shadow: 0 0 0 2000px rgba(0,0,0,.25);
}
.esm-scanner-status {
	font-size: 13px;
	color: #666;
	margin: 12px 0 6px;
}
#esm-scanner-result { min-height: 26px; }

.esm-checkin-success {
	background: #e5f5ea;
	border: 2px solid #3ba55d;
	border-radius: 10px;
	padding: 16px 20px;
	text-align: center;
	animation: esmCheckinPop .25s ease;
}
.esm-checkin-success-icon {
	width: 44px;
	height: 44px;
	line-height: 44px;
	margin: 0 auto 8px;
	background: #3ba55d;
	color: #fff;
	border-radius: 50%;
	font-size: 24px;
	font-weight: 700;
}
.esm-checkin-success-name { font-size: 18px; font-weight: 700; color: #1a7a3d; }
.esm-checkin-success-seats { font-size: 13px; color: #2e6b45; margin-top: 2px; }
.esm-checkin-seat-list {
	margin-top: 10px;
	text-align: left;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
}
.esm-checkin-seat-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	font-size: 12.5px;
	border-bottom: 1px solid #dcefe1;
}
.esm-checkin-seat-row:last-child { border-bottom: none; }
.esm-checkin-seat-label { font-weight: 700; color: #1a7a3d; min-width: 56px; }
.esm-checkin-seat-category {
	background: #e5f5ea;
	color: #1a7a3d;
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 2px 7px;
	border-radius: 10px;
}
.esm-checkin-seat-attendee { color: #333; flex: 1; text-align: right; }
.esm-checkin-success-label {
	margin-top: 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #4a9968;
}
.esm-checkin-invalid {
	background: #fce9e9;
	border: 2px solid #c0392b;
	border-radius: 10px;
	padding: 16px 20px;
	text-align: center;
	animation: esmCheckinPop .25s ease;
}
.esm-checkin-invalid-icon {
	width: 44px;
	height: 44px;
	line-height: 44px;
	margin: 0 auto 8px;
	background: #c0392b;
	color: #fff;
	border-radius: 50%;
	font-size: 22px;
	font-weight: 700;
}
.esm-checkin-invalid-label {
	font-size: 13.5px;
	font-weight: 600;
	color: #a53a3a;
}
.esm-checkin-already {
	background: #fdf3d9;
	border: 2px solid #c9971f;
	border-radius: 10px;
	padding: 16px 20px;
	text-align: center;
	animation: esmCheckinPop .25s ease;
}
.esm-checkin-already-icon {
	width: 44px;
	height: 44px;
	line-height: 44px;
	margin: 0 auto 8px;
	background: #c9971f;
	color: #fff;
	border-radius: 50%;
	font-size: 22px;
	font-weight: 700;
}
.esm-checkin-already-name { font-size: 18px; font-weight: 700; color: #8a6a12; }
.esm-checkin-already-label {
	margin-top: 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #a5810f;
}
@keyframes esmCheckinPop {
	from { transform: scale(.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.esm-expand-col { width: 34px; }
.esm-expand-toggle {
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #dcdcde;
	background: #f8f8f9;
	border-radius: 5px;
	cursor: pointer;
	color: #555;
}
.esm-expand-toggle:hover { background: #eee; }
.esm-expand-toggle svg { transition: transform .15s ease; }
.esm-expand-toggle.esm-expanded svg { transform: rotate(180deg); }

.esm-delete-booking {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #f0b4b4;
	background: #fff5f5;
	color: #c0392b;
	border-radius: 5px;
	cursor: pointer;
}
.esm-delete-booking:hover { background: #fde3e3; }

.esm-view-qr-link {
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #cfe0ee;
	background: #f0f6fc;
	color: #2271b1;
	border-radius: 5px;
	margin-right: 4px;
	vertical-align: middle;
}
.esm-view-qr-link:hover { background: #e2eef9; color: #135e96; }
button.esm-sync-payment, button.esm-resend-receipt, button.esm-confirm-cash, button.esm-op-btn { padding: 0; cursor: pointer; font: inherit; }
button.esm-op-btn { font-size: 14px; line-height: 1; }
button.esm-confirm-cash { background: #edfaef; border-color: #b8e6bf; color: #008a20; }
button.esm-confirm-cash:hover { background: #d7f2dc; color: #006b19; }
button.esm-sync-payment:disabled { cursor: progress; }
.esm-delete-booking:disabled { opacity: .5; cursor: not-allowed; }

.esm-delete-disabled {
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #c9c9cd;
	cursor: not-allowed;
}

.esm-relative-time {
	display: block;
	font-size: 11px;
	color: #999;
}

.esm-detail-row td { padding: 0 12px 14px; border-top: none; }
.esm-detail-panel {
	background: #f7f8fa;
	border: 1px solid #e5e5e8;
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 13px;
}
.esm-detail-panel strong { display: block; margin-bottom: 8px; }
.esm-detail-seat-list { margin: 0; padding: 0; list-style: none; }
.esm-detail-seat-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
}
.esm-detail-seat-list .esm-seat-chip { margin: 0; }

/* Scrollable wrapper around the bookings/attendance table — lets the
   table itself scroll sideways on a narrow phone screen instead of
   forcing the WHOLE wp-admin page wider than the viewport (which is
   what was actually breaking out of the WordPress layout on mobile). */
.esm-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 10px;
}
.esm-table-scroll .esm-bookings-table { margin-bottom: 0; }

@media (max-width: 600px) {
	.esm-bookings-wrap { max-width: 100%; overflow-x: hidden; }
	.esm-bookings-filter select,
	#esm-bookings-search,
	#esm-confirm-search {
		flex: 1 1 100%;
		min-width: 0;
	}
	.esm-summary-card { flex: 1 1 calc(50% - 7px); min-width: 0; padding: 12px 14px; }
	.esm-summary-num { font-size: 20px; }

	/* table-layout:fixed makes the browser respect the Seats column's
	   explicit width below instead of letting a long run of seat chips
	   force that column wider (which was pushing into the Full Name/
	   Status columns and overlapping them). A min-width on the table
	   keeps the OTHER columns from getting squashed to nothing — the
	   table becomes wider than the phone screen as a whole, which is
	   fine, since .esm-table-scroll already lets it scroll sideways on
	   its own instead of breaking the page layout. */
	.esm-bookings-table { table-layout: fixed; width: 100%; min-width: 480px; }
	.esm-bookings-table th,
	.esm-bookings-table td { padding: 8px; font-size: 12.5px; }
	.esm-bookings-table th:not(:first-child),
	.esm-bookings-table td:not(:first-child) { white-space: nowrap; }

	.esm-bookings-table th:first-child,
	.esm-bookings-table td:first-child { width: 150px; }
	.esm-seats-cell {
		max-width: 150px;
		white-space: normal;
		overflow-wrap: break-word;
	}
	.esm-seat-chip {
		font-size: 10.5px;
		padding: 2px 6px;
		max-width: 100%;
		white-space: normal;
		word-break: break-word;
	}
}

/* Complimentary tickets */
.esm-comp-panel { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; max-width: 760px; }
.esm-comp-panel h3 { margin: 0 0 4px; }
.esm-comp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 10px 0; }
.esm-comp-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: #50575e; }
.esm-comp-grid input { font-weight: 400; }
@media (max-width: 700px) { .esm-comp-grid { grid-template-columns: 1fr; } }
.esm-badge-comp { background: #f3eefc; color: #6b3fb8; margin-top: 4px; display: inline-block; }

/* Ticket holders (orders of 2+ tickets) */
.esm-holder-line { margin-top: 6px; font-size: 12px; color: #50575e; display: flex; align-items: center; gap: 4px; max-width: 260px; }
.esm-holder-line .dashicons { font-size: 15px; width: 15px; height: 15px; color: #0891b2; }
.esm-holder-line em { font-style: normal; color: #0891b2; font-weight: 600; }
.esm-holder-meta { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #f0f6fc; color: #2c3338; font-size: 12px; }
.esm-holder-list { margin: 6px 0 4px 18px; padding: 0; }
.esm-holder-list li { margin: 3px 0; }
.esm-names-line { display: block; margin-top: 3px; font-size: 12px; color: #646970; }

/* Complimentary ticket — tickets-only events */
.esm-comp-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.esm-comp-tt { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #dcdcde; border-radius: 8px; padding: 8px 10px; background: #fff; }
.esm-comp-tt .nm { display: flex; flex-direction: column; }
.esm-comp-tt small { color: #646970; }
.esm-comp-tt input { width: 70px; }
@media (max-width: 782px) {
	.esm-comp-grid { grid-template-columns: 1fr !important; }
	.esm-comp-grid input { width: 100%; }
	.esm-comp-tickets { grid-template-columns: 1fr; }
	.esm-comp-panel .button { min-height: 40px; }
}

.esm-comp-panel .esm-req { color: #b32d2e; font-weight: 700; }
.esm-comp-panel input.esm-bad { border-color: #b32d2e !important; box-shadow: 0 0 0 1px #b32d2e; }
