/**
 * ExistBI - Event Espresso frontend styling
 * Matches the Enfold/ExistBI look: Open Sans, primary blue #0e68b7, avia-button style.
 * Scoped to EE markup so it never touches the rest of the site.
 */

:root {
	--existbi-blue: #0e68b7;
	--existbi-blue-dark: #0c4695;
	--existbi-border: #e2e6ea;
	--existbi-muted: #6b7280;
	--existbi-bg-soft: #f7f9fb;
}

/* ---- Base typography ---- */
.event-tickets,
.event-datetimes,
#ee-single-event,
.spco-attendee-panel-dv,
#ee-registration-form,
.ee-registration-form,
#espresso-thank-you-page-overview-dv,
.ee-attendee-questions-frm,
.event-espresso-form {
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	color: #333;
}

.event-tickets,
.event-datetimes {
	margin: 0 0 2em;
}

/* ---- Headings ---- */
.event-espresso-form h1,
.event-espresso-form h2,
.event-espresso-form h3,
#ee-single-event h1,
#ee-single-event h2,
.spco-step-title-dv,
.ee-form-section-hdr {
	color: var(--existbi-blue);
	font-family: 'open sans', Helvetica, Arial, sans-serif;
}

/* =========================================================
   Ticket selector table
   ========================================================= */
.tkt-slctr-tbl {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--existbi-border);
	border-radius: 4px;
	overflow: hidden;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 15px;
	margin: 0 0 1.25em;
	background: #fff;
}

.tkt-slctr-tbl thead th,
.ee-ticket-selector-ticket-details-th,
.ee-ticket-selector-ticket-qty-th {
	background-color: var(--existbi-blue);
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 12px 16px;
	border: none;
	text-align: left;
}

.ee-ticket-selector-ticket-qty-th,
.tkt-slctr-tbl .cntr {
	text-align: center;
}

.tkt-slctr-tbl .jst-rght {
	text-align: right;
}

.tckt-slctr-tbl-tr > td {
	padding: 16px;
	border-bottom: 1px solid var(--existbi-border);
	vertical-align: middle;
	background: #fff;
}

.tkt-slctr-tbl tbody tr:last-child > td {
	border-bottom: none;
}

.tckt-slctr-tbl-td-name {
	font-weight: 600;
	color: #222;
}

.tckt-slctr-tbl-td-price,
.tckt-price--nowrap {
	font-weight: 600;
	color: var(--existbi-blue);
	white-space: nowrap;
	font-size: 17px;
}

/* Sold-out / expired rows read as muted, not broken */
.tckt-slctr-tbl-tr.ticket-sales-expired > td,
.tckt-slctr-tbl-tr.ticket-sold-out > td {
	background: var(--existbi-bg-soft);
	color: var(--existbi-muted);
}

/* "show details +" toggle */
.display-tckt-slctr-tkt-details,
.hide-tckt-slctr-tkt-details {
	display: inline-block;
	margin-left: 8px;
	font-size: 13px;
	font-weight: 400;
	color: var(--existbi-blue) !important;
	text-decoration: none;
	cursor: pointer;
}

.display-tckt-slctr-tkt-details:hover,
.hide-tckt-slctr-tkt-details:hover {
	text-decoration: underline;
}

/* Quantity select */
.ticket-selector-tbl-qty-slct {
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 15px;
	padding: 7px 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	min-width: 70px;
	color: #333;
}

.ticket-selector-tbl-qty-slct:focus {
	border-color: var(--existbi-blue);
	outline: none;
}

/* =========================================================
   Expanded ticket details (inner table)
   ========================================================= */
.tckt-slctr-tkt-details-td {
	padding: 0 !important;
	background: var(--existbi-bg-soft) !important;
}

.tckt-slctr-tkt-details-dv {
	padding: 16px;
	font-size: 14px;
}

.tckt-slctr-tkt-details-tbl-wrap-dv {
	overflow-x: auto;
	margin-bottom: 12px;
}

.tckt-slctr-tkt-details-tbl {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid var(--existbi-border);
	font-size: 13px;
}

.tckt-slctr-tkt-details-tbl th {
	background: #eef3f8;
	color: #33475b;
	font-weight: 600;
	padding: 8px 10px;
	border-bottom: 1px solid var(--existbi-border);
	text-align: left;
	font-size: 12px;
	text-transform: none;
}

.tckt-slctr-tkt-details-tbl td {
	padding: 8px 10px;
	border-bottom: 1px solid #f0f2f4;
}

.ticket-details-label-spn {
	font-weight: 600;
	color: #33475b;
}

.tckt-slctr-tkt-price-sctn,
.tckt-slctr-tkt-datetimes-sctn,
.tckt-slctr-tkt-sale-dates-sctn {
	margin-bottom: 12px;
}

/* =========================================================
   Submit button - matches .avia-button
   ========================================================= */
.ticket-selector-submit-btn-wrap {
	margin: 4px 0 0;
}

input[type="submit"].ticket-selector-submit-btn,
.ticket-selector-submit-btn,
.ee-button,
.ee-submit-button,
input[type="submit"].ee-submit-button,
.spco-next-step-btn,
.spco-nav-btn,
#spco-go-to-step-finalize_registration-btn,
a.ee-button,
button.ee-button {
	background-color: var(--existbi-blue) !important;
	background-image: none !important;
	border: 1px solid var(--existbi-blue) !important;
	color: #fff !important;
	font-family: 'open sans', Helvetica, Arial, sans-serif !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	padding: 0.75em 1.5em !important;
	border-radius: 3px !important;
	text-shadow: none !important;
	box-shadow: none !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	transition: background-color 0.2s ease !important;
	cursor: pointer;
	width: auto !important;
}

input[type="submit"].ticket-selector-submit-btn:hover,
.ticket-selector-submit-btn:hover,
.ee-button:hover,
.ee-submit-button:hover,
input[type="submit"].ee-submit-button:hover,
.spco-next-step-btn:hover,
.spco-nav-btn:hover,
#spco-go-to-step-finalize_registration-btn:hover,
a.ee-button:hover,
button.ee-button:hover {
	background-color: var(--existbi-blue-dark) !important;
	border-color: var(--existbi-blue-dark) !important;
	color: #fff !important;
}

/* =========================================================
   Event dates - card grid
   EE ships `.espresso_events .event-datetimes > .ee-event-datetimes-ul`
   with flex + width:30% + margin-inline-start, which staircases the cards.
   These rules match that specificity so the grid actually wins.
   ========================================================= */
.espresso_events .event-datetimes > .ee-event-datetimes-ul,
.espresso_events .event-datetimes > .ee-event-datetimes-ul--big {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	list-style: none;
	margin: 0 0 1rem;
	margin-inline: 0;
	padding: 0;
	padding-inline: 0;
	width: 100%;
	justify-content: initial;
}

.espresso_events .event-datetimes > .ee-event-datetimes-ul .ee-event-datetimes-li,
.espresso_events .event-datetimes > .ee-event-datetimes-ul--big .ee-event-datetimes-li {
	list-style: none;
	float: none;
	width: auto;
	margin: 0;
	margin-inline-start: 0;
	margin-block-end: 0;
	padding: 14px 16px;
	border: 1px solid var(--existbi-border);
	border-left: 3px solid var(--existbi-blue);
	border-radius: 4px;
	background: #fff;
	position: relative;
	font-size: 15px;
	line-height: 1.5;
}

/* EE forces spans to inline-block, which puts date and time on one line */
.espresso_events .event-datetimes > .ee-event-datetimes-ul .ee-event-datetimes-li span.ee-event-datetimes-li-daterange {
	display: block;
	margin: 0 0 4px;
	font-weight: 600;
	color: #222;
}

.espresso_events .event-datetimes > .ee-event-datetimes-ul .ee-event-datetimes-li span.ee-event-datetimes-li-timerange {
	display: block;
	margin: 0;
	margin-inline-end: 0;
	color: var(--existbi-muted);
	font-size: 14px;
}

/* the <br> between date and time is redundant once both are block */
.ee-event-datetimes-li br {
	display: none;
}

.espresso_events .event-datetimes > .ee-event-datetimes-ul .ee-event-datetimes-li .dashicons {
	color: var(--existbi-blue);
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
	position: relative;
	top: -1px;
	margin-right: 2px;
}

/* iCal download button.
   EE renders it as <input type="submit" value=""> expecting a dashicons glyph,
   which lands empty here - so draw the calendar icon as a background instead. */
.download-iCal-frm {
	display: inline-block;
	margin: 10px 0 0;
}

input[type="submit"].ee-ical-sbmt,
.ee-ical-sbmt {
	background-color: #fff !important;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230e68b7'%3E%3Cpath d='M6 2v2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H8V2H6zm10 6v8H4V8h12z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 15px 15px !important;
	border: 1px solid var(--existbi-border) !important;
	border-radius: 3px !important;
	width: 30px !important;
	height: 28px !important;
	min-width: 0 !important;
	padding: 0 !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-indent: -9999px;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.8;
	box-shadow: none !important;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

input[type="submit"].ee-ical-sbmt:hover,
.ee-ical-sbmt:hover {
	opacity: 1;
	border-color: var(--existbi-blue) !important;
	background-color: #fff !important;
}

/* =========================================================
   Registration / checkout steps
   ========================================================= */
.spco-attendee-panel,
.spco-attendee-panel-dv {
	background: #fff;
	border: 1px solid var(--existbi-border);
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 16px;
}

.spco-steps-dv .spco-step-active {
	color: var(--existbi-blue);
	font-weight: 600;
}

/* ---- Steps header ---- */
.spco-steps-big-hdr {
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--existbi-muted);
	margin: 0 0 10px;
}

#spco-steps-display-dv {
	border-top: 1px solid var(--existbi-border);
	border-bottom: 1px solid var(--existbi-border);
	padding: 12px 0;
	margin-bottom: 22px;
}

.spco-steps-display-hdr {
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	margin: 0;
}

.spco-step-display-dv .spco-step-big-nmbr {
	color: var(--existbi-muted);
	font-weight: 700;
}

.spco-step-display-dv.active-step .spco-step-big-nmbr,
.spco-step-display-dv.active-step .spco-step-name {
	color: var(--existbi-blue);
}

.spco-step-display-dv.active-step .spco-step-name {
	font-weight: 600;
}

.spco-steps-pg {
	color: var(--existbi-muted);
}

/* ---- Order summary table ---- */
.spco-ticket-info-dv {
	margin: 0 0 22px;
}

table.spco-ticket-details {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--existbi-border);
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 15px;
}

table.spco-ticket-details th {
	background-color: var(--existbi-blue);
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 11px 14px;
	border: none;
}

table.spco-ticket-details td {
	padding: 14px;
	border: none;
	border-bottom: 1px solid var(--existbi-border);
	vertical-align: top;
	background: #fff;
}

table.spco-ticket-details tr:last-child td {
	border-bottom: none;
}

table.spco-ticket-details .ee-ticket-details-name {
	font-weight: 600;
	color: #222;
}

table.spco-ticket-details .ee-ticket-details-total,
table.spco-ticket-details .ee-ticket-details-price {
	white-space: nowrap;
	color: var(--existbi-blue);
	font-weight: 600;
}

/* ---- Payment step: registrations table ---- */
.spco-payment-info-dv {
	margin: 0 0 22px;
}

table#spco-payment-info-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--existbi-border);
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 14px;
}

table#spco-payment-info-table th {
	background-color: var(--existbi-blue);
	color: #fff !important;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 10px 12px;
	border: none;
}

table#spco-payment-info-table td {
	padding: 11px 12px;
	border: none;
	border-bottom: 1px solid var(--existbi-border);
	background: #fff;
}

table#spco-payment-info-table tr:last-child td {
	border-bottom: none;
}

/* ---- Payment method chooser ---- */
.spco-payment-method-input-dv {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	margin: 0 0 10px;
	border: 1px solid var(--existbi-border);
	border-radius: 4px;
	background: #fff;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.spco-payment-method-input-dv:hover {
	border-color: var(--existbi-blue);
	background: var(--existbi-bg-soft);
}

.spco-payment-method-btn-img {
	max-height: 34px;
	width: auto;
}

/* ---- Next / back buttons ---- */
.spco-whats-next-buttons {
	margin: 18px 0 0;
}

input.spco-next-step-btn,
.spco-next-step-btn.button,
.spco-next-step-btn.button--primary {
	background-color: var(--existbi-blue) !important;
	background-image: none !important;
	border: 1px solid var(--existbi-blue) !important;
	color: #fff !important;
	border-radius: 3px !important;
	font-size: 16px !important;
	padding: 0.75em 1.5em !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

.ee-attendee-questions-frm input[type="text"],
.ee-attendee-questions-frm input[type="email"],
.ee-attendee-questions-frm input[type="tel"],
.ee-attendee-questions-frm select,
.ee-attendee-questions-frm textarea,
.spco-attendee-panel-dv input[type="text"],
.spco-attendee-panel-dv input[type="email"],
.spco-attendee-panel-dv input[type="tel"],
.spco-attendee-panel-dv select,
.spco-attendee-panel-dv textarea,
.ee-reg-qstn {
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 10px;
	font-size: 15px;
	width: 100%;
	box-sizing: border-box;
	background: #fff;
}

.ee-attendee-questions-frm input:focus,
.spco-attendee-panel-dv input:focus,
.ee-reg-qstn:focus {
	border-color: var(--existbi-blue);
	outline: none;
}

/* ---- Thank you page ---- */
#espresso-thank-you-page-overview-dv h2,
.ee-attention {
	color: var(--existbi-blue);
}

/* Enfold renders events through the blog post template, which draws a 1px
   vertical "author timeline" rule across the content. Not wanted on events. */
.single-espresso_events .post_author_timeline,
.post-type-archive-espresso_events .post_author_timeline {
	display: none;
}

/* =========================================================
   Events archive (archive-espresso_events.php)
   ========================================================= */
.existbi-ee-archive {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
	margin: 0 0 2em;
}

.existbi-ee-archive__card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--existbi-border);
	border-top: 3px solid var(--existbi-blue);
	border-radius: 4px;
	background: #fff;
	padding: 22px 24px;
	margin: 0;
}

.existbi-ee-archive__title {
	margin: 0 0 14px;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 19px;
	line-height: 1.35;
	font-weight: 600;
}

.existbi-ee-archive__title a {
	color: #222;
	text-decoration: none;
}

.existbi-ee-archive__title a:hover {
	color: var(--existbi-blue);
}

/* date list inside a card is more compact than on the single event page */
.existbi-ee-archive__card .ee-event-datetimes-ul {
	display: block;
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}

.existbi-ee-archive__card .ee-event-datetimes-li {
	list-style: none;
	float: none;
	width: auto;
	margin: 0 0 6px;
	padding: 0 0 0 2px;
	border: none;
	background: transparent;
	font-size: 14px;
	color: #444;
}

/* keep date and time on separate lines inside the compact card */
.existbi-ee-archive__card .ee-event-datetimes-li span.ee-event-datetimes-li-daterange {
	display: block !important;
	margin: 0 !important;
	font-weight: 600;
	color: #222;
}

.existbi-ee-archive__card .ee-event-datetimes-li span.ee-event-datetimes-li-timerange {
	display: block !important;
	margin: 0 0 8px !important;
	color: var(--existbi-muted);
	font-size: 13px;
}

.existbi-ee-archive__card .ee-event-datetimes-li br {
	display: none;
}

.existbi-ee-archive__card .ee-event-datetimes-li .dashicons {
	color: var(--existbi-blue);
	font-size: 15px;
	width: 15px;
	height: 15px;
	vertical-align: -2px;
	margin-right: 3px;
}

.existbi-ee-archive__card .download-iCal-frm {
	display: none;
}

.existbi-ee-archive__excerpt {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--existbi-muted);
}

.existbi-ee-archive__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--existbi-border);
}

.existbi-ee-archive__price {
	font-size: 19px;
	font-weight: 600;
	color: var(--existbi-blue);
	white-space: nowrap;
}

.existbi-ee-archive__price-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--existbi-muted);
}

a.existbi-ee-archive__btn {
	display: inline-block;
	background-color: var(--existbi-blue);
	border: 1px solid var(--existbi-blue);
	color: #fff !important;
	font-family: 'open sans', Helvetica, Arial, sans-serif;
	font-size: 15px;
	padding: 0.7em 1.3em;
	border-radius: 3px;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}

a.existbi-ee-archive__btn:hover {
	background-color: var(--existbi-blue-dark);
	border-color: var(--existbi-blue-dark);
	color: #fff !important;
}

.existbi-ee-archive__empty {
	padding: 24px;
	border: 1px solid var(--existbi-border);
	border-radius: 4px;
	background: var(--existbi-bg-soft);
	color: var(--existbi-muted);
}

/* =========================================================
   Tablet
   ========================================================= */
@media only screen and (max-width: 900px) {
	.espresso_events .event-datetimes > .ee-event-datetimes-ul,
	.espresso_events .event-datetimes > .ee-event-datetimes-ul--big {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

/* =========================================================
   Mobile - 600px matches EE's own ticket-selector breakpoint
   EE only adds overflow-x below 400px, so the table overflows
   between 400-600px. Turn each ticket row into a card instead.
   ========================================================= */
@media only screen and (max-width: 600px) {

	/* ---- Ticket selector becomes a stack of cards ---- */
	.tkt-slctr-tbl-wrap-dv {
		overflow: visible;
	}

	.tkt-slctr-tbl {
		display: block;
		width: 100%;
		border: none;
		border-radius: 0;
		background: transparent;
		font-size: 15px;
		overflow: visible;
	}

	.tkt-slctr-tbl thead {
		/* keep for screen readers, drop visually */
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.tkt-slctr-tbl tbody {
		display: block;
		width: 100%;
	}

	.tkt-slctr-tbl .tckt-slctr-tbl-tr {
		display: block;
		width: 100%;
		border: 1px solid var(--existbi-border);
		border-left: 3px solid var(--existbi-blue);
		border-radius: 4px;
		background: #fff;
		margin: 0 0 12px;
		overflow: hidden;
	}

	.tkt-slctr-tbl .tckt-slctr-tbl-tr > td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		width: auto;
		padding: 11px 14px;
		border: none;
		border-bottom: 1px solid #f0f2f4;
		text-align: left;
	}

	.tkt-slctr-tbl .tckt-slctr-tbl-tr > td:last-child {
		border-bottom: none;
	}

	/* Ticket name gets its own full-width line */
	.tkt-slctr-tbl .tckt-slctr-tbl-td-name {
		display: block;
		background: var(--existbi-bg-soft);
		font-size: 16px;
	}

	/* Re-add the column labels the hidden thead used to provide */
	.tkt-slctr-tbl .tckt-slctr-tbl-td-price::before {
		content: "Price";
		font-weight: 600;
		font-size: 13px;
		color: var(--existbi-muted);
		text-transform: uppercase;
		letter-spacing: 0.02em;
	}

	.tkt-slctr-tbl .tckt-slctr-tbl-td-qty::before {
		content: "Quantity";
		font-weight: 600;
		font-size: 13px;
		color: var(--existbi-muted);
		text-transform: uppercase;
		letter-spacing: 0.02em;
	}

	.tkt-slctr-tbl .ticket-selector-tbl-qty-slct {
		min-width: 84px;
	}

	/* EE floats this wrapper right and shrink-wraps it */
	.ticket-selector-submit-btn-wrap {
		display: flex !important;
		justify-content: center;
		float: none !important;
		width: 100%;
	}

	input[type="submit"].ticket-selector-submit-btn,
	.ticket-selector-submit-btn {
		width: 100% !important;
		max-width: 320px;
		margin: 0 auto;
		float: none !important;
	}

	/* ---- Expanded ticket details ---- */
	.tkt-slctr-tbl .tckt-slctr-tkt-details-td {
		display: block;
		padding: 0 !important;
	}

	.tckt-slctr-tkt-details-dv {
		padding: 14px;
	}

	/* EE sets min-width:300px which forces a sideways scroll on small phones */
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl {
		min-width: 0;
		width: 100%;
		display: block;
	}

	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl tbody,
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl tr,
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl td {
		display: block;
		width: auto;
	}

	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl tr {
		border: 1px solid var(--existbi-border);
		border-radius: 4px;
		background: #fff;
		margin-bottom: 10px;
		padding: 4px 0;
	}

	/* EE hides these spacer/label cells on mobile - keep them hidden,
	   otherwise an empty ":" label shows up above Total. */
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl th,
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl .ttl-lbl-td,
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl .sbttl {
		display: none;
	}

	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl td {
		padding: 7px 12px;
		border: none;
		border-bottom: 1px solid #f4f6f8;
		text-align: left;
	}

	/* EE right-aligns amounts for the desktop table layout */
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl td.jst-rght,
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl td.cntr {
		text-align: left;
	}

	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl td:last-child {
		border-bottom: none;
	}

	/* EE renders the label inline at a fixed 8.5em, which wraps badly.
	   Put it on its own line above the value instead. */
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-details-tbl td::before {
		display: block;
		width: auto;
		margin-bottom: 2px;
		font-weight: 600;
		font-size: 12px;
		color: var(--existbi-muted);
		text-transform: uppercase;
		letter-spacing: 0.02em;
	}

	/* EE flips the Access table back to a real table at this width - undo it */
	.tckt-slctr-tkt-details-dv .tckt-slctr-tkt-datetimes-sctn .tckt-slctr-tkt-details-tbl {
		display: block;
		table-layout: auto;
		font-size: 14px;
	}

	.tckt-slctr-tkt-details-tbl-wrap-dv {
		overflow-x: visible;
	}

	/* ---- Dates ---- */
	.espresso_events .event-datetimes > .ee-event-datetimes-ul,
	.espresso_events .event-datetimes > .ee-event-datetimes-ul--big {
		grid-template-columns: 1fr;
	}

	/* ---- Checkout: order summary becomes a card ---- */
	table.spco-ticket-details,
	table.spco-ticket-details tbody,
	table.spco-ticket-details tr,
	table.spco-ticket-details td {
		display: block;
		width: 100%;
	}

	table.spco-ticket-details thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	table.spco-ticket-details {
		border: 1px solid var(--existbi-border);
		border-left: 3px solid var(--existbi-blue);
	}

	/* EE sets percentage widths on these cells for the desktop table layout */
	table.spco-ticket-details td.ee-ticket-details-name,
	table.spco-ticket-details td.ee-ticket-details-qty,
	table.spco-ticket-details td.ee-ticket-details-price,
	table.spco-ticket-details td.ee-ticket-details-total {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px;
		width: 100%;
		max-width: none;
		min-width: 0;
		padding: 11px 14px;
		border: none;
		border-bottom: 1px solid #f0f2f4;
		text-align: left !important;
	}

	/* ticket name gets its own full-width row */
	table.spco-ticket-details td.ee-ticket-details-name {
		display: block;
		background: var(--existbi-bg-soft);
		font-size: 15px;
		line-height: 1.45;
	}

	table.spco-ticket-details tr td:last-child {
		border-bottom: none;
	}

	/* re-add the labels the hidden thead provided */
	table.spco-ticket-details td.ee-ticket-details-qty::before {
		content: "Qty";
	}

	table.spco-ticket-details td.ee-ticket-details-price::before {
		content: "Price";
	}

	table.spco-ticket-details td.ee-ticket-details-total::before {
		content: "Total";
	}

	table.spco-ticket-details td.ee-ticket-details-qty::before,
	table.spco-ticket-details td.ee-ticket-details-price::before,
	table.spco-ticket-details td.ee-ticket-details-total::before {
		font-size: 13px;
		font-weight: 600;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		color: var(--existbi-muted);
	}

	/* ---- Checkout: payment step registrations table ----
	   Nested rows and a total row make card-stacking unreliable here,
	   so keep the table but make it fit and scroll if it still can't. */
	.spco-payment-info-dv {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	table#spco-payment-info-table {
		width: 100%;
		table-layout: fixed;
		font-size: 12px;
	}

	table#spco-payment-info-table th {
		font-size: 10px;
		padding: 8px 6px;
		word-break: normal;
	}

	table#spco-payment-info-table td {
		padding: 8px 6px;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	/* fixed narrow columns so the name column absorbs the remaining width
	   and Total is never cut off */
	table#spco-payment-info-table .spco-table-qty,
	table#spco-payment-info-table th.spco-table-qty {
		width: 28px;
	}

	table#spco-payment-info-table th:nth-child(2),
	table#spco-payment-info-table th:nth-child(4) {
		width: 68px;
	}

	/* ---- Checkout: payment methods stack vertically ----
	   All methods sit in one wrapper and their labels are floated left,
	   which lines them up side by side and overflows on a phone. */
	#ee-available-payment-method-inputs,
	.spco-payment-method-input-dv {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		width: 100%;
		box-sizing: border-box;
	}

	.spco-payment-method-input-dv {
		padding: 0;
		border: none;
		background: transparent;
	}

	.spco-payment-method-input-dv:hover {
		background: transparent;
		border-color: transparent;
	}

	.spco-payment-method-input-dv label.ee-radio-label-after,
	.spco-payment-method-input-dv label.ee-radio-label-after.tiny-lbl {
		display: flex !important;
		align-items: center;
		gap: 10px;
		float: none !important;
		width: 100% !important;
		max-width: none !important;
		min-height: 0;
		box-sizing: border-box;
		margin: 0;
		padding: 12px 14px;
		border: 1px solid var(--existbi-border);
		border-radius: 4px;
		background: #fff;
	}

	.spco-payment-method-input-dv label.ee-radio-label-after {
		justify-content: flex-start;
		text-align: left;
	}

	.spco-payment-method-btn-img {
		max-height: 30px;
		max-width: 150px;
		width: auto;
		margin: 0 !important;
	}

	/* ---- Checkout: step header and buttons ---- */
	#spco-steps-display-dv {
		padding: 10px 0;
		margin-bottom: 18px;
	}

	.spco-step-display-dv {
		display: block;
		width: auto;
		float: none;
	}

	.spco-step-arrow-dv {
		display: none;
	}

	.spco-whats-next-buttons {
		display: flex;
		justify-content: center;
	}

	input.spco-next-step-btn,
	.spco-next-step-btn.button {
		width: 100% !important;
		max-width: 320px;
		float: none !important;
	}
}

/* ---- EE ajax notices (validation errors etc.) ----
   EE renders them position:fixed with z-index 999, which the sticky theme
   header overlaps - the box got "crossed out" and its close X was unreachable.
   Lift them above everything, pin below the header, and make the X obvious. */
#espresso-ajax-notices {
	z-index: 2147483000 !important;
	top: 140px !important;
	left: 50% !important;
	transform: translateX(-50%);
	margin-left: 0 !important;
	width: auto !important;
	max-width: min(680px, 92vw);
}

#espresso-ajax-notices .espresso-ajax-notice {
	position: relative;
	border-radius: 6px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

#espresso-ajax-notices .close-espresso-notice {
	top: 6px !important;
	right: 6px !important;
	font-size: 22px;
	line-height: 1;
	padding: 4px;
	cursor: pointer;
	opacity: 0.7;
}

#espresso-ajax-notices .close-espresso-notice:hover {
	opacity: 1;
}

/* ---- UK/EU zone: VAT note under the ticket selector ---- */
.existbi-ee-vat-note {
	margin: 10px 0 0;
	padding: 10px 14px;
	background: #f4f7fa;
	border-left: 3px solid #1f6fb2;
	font-size: 14px;
	line-height: 1.5;
	color: #444;
}

/* ---- Promo code field under the ticket selector ---- */
.existbi-promo-field {
	margin: 12px 0 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.existbi-promo-field label {
	font-size: 14px;
	color: #444;
	margin: 0;
}

.existbi-promo-field input {
	max-width: 220px;
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-transform: uppercase;
}

/* ---- BOOK A / BOOK B buttons in the Course Summary ---- */
.existbi-book-btn-wrap {
	margin: 8px 0 14px;
}

.existbi-book-btn {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none !important;
	color: #fff !important;
	background: #1f6fb2;
	transition: background 0.2s ease;
}

.existbi-book-btn:hover {
	background: #16548a;
	color: #fff !important;
}

.existbi-book-btn--b {
	background: #3d8b3d;
}

.existbi-book-btn--b:hover {
	background: #2f6b2f;
}

/* ---- PO note under the ticket selector ---- */
.existbi-ee-po-note {
	margin: 8px 0 0;
	font-size: 13px;
	color: #666;
}

/* ---- EU reverse charge checkbox ---- */
.existbi-reverse-charge-field {
	margin: 10px 0 0;
	font-size: 13px;
	color: #444;
}

.existbi-reverse-charge-field label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	cursor: pointer;
}

.existbi-reverse-charge-field input {
	margin-top: 2px;
	flex: none;
}

/* ---- Thank-you page: tidy the details tables ---- */
[id^="espresso-thank-you-page"] table,
.espresso-thank-you-page table {
	width: 100%;
	border-collapse: collapse;
	margin: 6px 0 22px;
	font-size: 14px;
}

[id^="espresso-thank-you-page"] table th,
[id^="espresso-thank-you-page"] table td,
.espresso-thank-you-page table th,
.espresso-thank-you-page table td {
	border: 1px solid #e3e7eb;
	padding: 10px 14px;
	text-align: left;
	vertical-align: middle;
}

[id^="espresso-thank-you-page"] table th,
.espresso-thank-you-page table th {
	background: #f6f8fa;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
}

[id^="espresso-thank-you-page"] table label,
.espresso-thank-you-page table label {
	margin: 0;
	font-weight: 600;
	color: #333;
}

[id^="espresso-thank-you-page"] h3,
.espresso-thank-you-page h3 {
	margin: 26px 0 10px;
}

/* ---- Thank-you tables, round 2: EE's own stylesheet zeroes the left padding
   with a more specific selector, so these need !important. ---- */
article table.ee-table,
[id^="espresso-thank-you-page"] table {
	width: 100% !important;
	border-collapse: collapse !important;
	margin: 6px 0 24px !important;
}

article table.ee-table th,
article table.ee-table td,
[id^="espresso-thank-you-page"] table th,
[id^="espresso-thank-you-page"] table td {
	padding: 11px 14px !important;
	text-align: left !important;
	vertical-align: middle !important;
	border: 1px solid #e3e7eb !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
}

article table.ee-table th,
[id^="espresso-thank-you-page"] table th {
	background: #f6f8fa !important;
	font-weight: 600 !important;
	color: #333 !important;
}

article table.ee-table tr:nth-child(even) td,
[id^="espresso-thank-you-page"] table tr:nth-child(even) td {
	background: #fafbfc;
}

[id^="espresso-thank-you-page"] table label {
	display: inline;
}

/* ---- Booking page intro above the ticket selector ---- */
.existbi-ee-intro {
	margin: 0 0 24px;
	padding: 16px 20px;
	background: #f4f7fa;
	border-left: 3px solid #1f6fb2;
	border-radius: 0 4px 4px 0;
}

.existbi-ee-intro p {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.6;
	color: #333;
}

.existbi-ee-intro p:last-child {
	margin-bottom: 0;
}

.existbi-ee-intro__link a {
	font-weight: 600;
	text-decoration: none;
}

.existbi-ee-intro__link a:hover {
	text-decoration: underline;
}
