/* PB Ents Bookings — public "What's On" listing.
 *
 * Deliberately minimal so it inherits the host theme's typography and
 * colours rather than fighting them; the client's theme is expected to
 * layer its own styling on top of these classes if wanted.
 *
 * Display settings (v0.17.0) are carried in as CSS custom properties on
 * the outer .pbeb-public-theme-wrap, set inline per-request from the
 * Settings screen's values (see PB_EB_Public::build_style_vars()). Every
 * rule below that uses one of these variables gives a fallback so an
 * unset property (the default, out-of-the-box look) behaves exactly as
 * before this version — nothing changes until a setting is actually used.
 *
 * v0.17.1 adds a colour + size override per data item (date/time/act
 * name/label), layered on top of the general text colour/scale above —
 * an item's colour falls back to `inherit` (the wrapper's own resolved
 * text colour) when not individually set, and its size multiplies
 * against the overall text-scale rather than replacing it.
 *
 * v0.17.2 merges what were originally two separate image fields (a full
 * background image and a separate low-opacity "watermark" image) into
 * one — the same background image now carries its own opacity, so
 * turning it down produces a watermark-style effect without a second
 * field. Rendered on ::before rather than directly on the wrapper so the
 * opacity only ever affects the image, never the background colour or
 * the listing content sitting on top of it.
 */

.pbeb-public-theme-wrap {
	position: relative;
	font-size: calc(1em * var(--pbeb-font-scale, 1));
	color: var(--pbeb-text-color, inherit);
	background-color: var(--pbeb-bg-color, transparent);
}

.pbeb-public-theme-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--pbeb-bg-image, none);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	opacity: var(--pbeb-bg-image-opacity, 1);
	pointer-events: none;
}

.pbeb-public-theme-wrap > * {
	position: relative;
}

.pbeb-public-whatson {
	margin: 1em 0;
}

.pbeb-public-empty {
	font-style: italic;
	opacity: 0.8;
}

.pbeb-public-day {
	margin-bottom: 1.5em;
}

.pbeb-public-date {
	margin: 0 0 0.4em;
	color: var(--pbeb-date-color, inherit);
	font-size: calc(1em * var(--pbeb-date-scale, 1));
}

.pbeb-public-slots {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pbeb-public-slot {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	align-items: baseline;
	padding: 0.3em 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pbeb-public-time {
	font-weight: 600;
	min-width: 5.5em;
	color: var(--pbeb-time-color, inherit);
	font-size: calc(1em * var(--pbeb-time-scale, 1));
}

.pbeb-public-act {
	font-weight: 600;
	color: var(--pbeb-act-color, inherit);
	font-size: calc(1em * var(--pbeb-act-scale, 1));
}

.pbeb-public-label {
	opacity: 0.75;
	color: var(--pbeb-label-color, inherit);
	font-size: calc(0.9em * var(--pbeb-label-scale, 1));
}

/* Price / tickets (v0.21.10/0.21.11) — a small pill-style price, and a
   tickets link or phone line, sitting alongside the rest of a slot's
   details rather than styled as its own heavily-branded call-to-action.
   Deliberately plain — no colour/size Settings controls of their own yet,
   unlike date/time/act/label, since this is a first pass. */
.pbeb-public-price {
	font-weight: 600;
	padding: 0.05em 0.5em;
	border: 1px solid currentColor;
	border-radius: 3px;
	font-size: 0.85em;
	opacity: 0.9;
}

.pbeb-public-tickets-link {
	font-size: 0.85em;
	text-decoration: underline;
}

.pbeb-public-tickets-phone {
	font-size: 0.85em;
	opacity: 0.85;
}

/* Week/Month table layout — one row per calendar day. Deliberately
 * minimal (structure only) until a proper styling pass; the host theme's
 * table/typography styles are expected to apply on top of this. */

/* Previous/Next paging (v0.18.2, configurable v0.19.0) — plain text links
 * either side, "Today" appearing between them only once you've paged away
 * from the current period. Deliberately unstyled beyond layout, same
 * reasoning as the rest of this stylesheet. Whether this shows at all, and
 * how far it can page, is controlled from Settings — see PB_EB_Public::
 * get_nav_enabled()/get_nav_back_limit()/get_nav_forward_limit(). */
.pbeb-public-table-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.8em;
	margin-bottom: 0.6em;
	font-size: 0.85em;
}

.pbeb-public-table-today-link {
	opacity: 0.75;
}

/* Shown in place of a Previous/Next link once its configured paging limit
 * (v0.19.0) is reached, so the boundary is visible rather than the link
 * just vanishing. */
.pbeb-public-table-nav-limit {
	opacity: 0.35;
	cursor: default;
}

/* End-of-week delineation in the Month table layout (v0.19.0) — a
 * styleable line after the last day of each calendar week (per the
 * configured week-start day), so a month reads as a run of weeks rather
 * than one undifferentiated block. Deliberately a touch stronger than the
 * ordinary row divider above. Colour and thickness are configurable from
 * the Settings screen (PB_EB_Public::get_week_end_color()/
 * get_week_end_thickness()) via the --pbeb-week-end-color/-thickness
 * custom properties set on .pbeb-public-theme-wrap; the fallbacks below
 * apply whenever a setting is left at its default, and either can still be
 * overridden further by the host theme's own CSS.
 *
 * v0.19.3 fix: this used to be written as the single class
 * `.pbeb-public-table-week-end`, which has the exact same specificity as
 * the plain `.pbeb-public-table-row` divider rule below it — so on an
 * element carrying both classes (every week-end row does), whichever rule
 * happened to come LATER in this file won the cascade, regardless of which
 * one was "meant" to apply. `.pbeb-public-table-row` sits below this rule,
 * so it always silently overwrote the border set here — the class was
 * correctly in the HTML and the Settings colour/thickness were correctly
 * read, but the line itself could never actually render. Fixed by
 * compounding the selector with `.pbeb-public-table-row` so this rule's
 * specificity is unambiguously higher than the plain row-divider rule,
 * independent of source order. */
.pbeb-public-table-row.pbeb-public-table-week-end {
	border-bottom: var(--pbeb-week-end-thickness, 2px) solid var(--pbeb-week-end-color, rgba(0, 0, 0, 0.25));
}

.pbeb-public-table-heading {
	margin: 0 0 0.5em;
}

table.pbeb-public-table {
	width: 100%;
	border-collapse: collapse;
}

.pbeb-public-table-row {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pbeb-public-table-row-today {
	background: rgba(0, 0, 0, 0.03);
}

.pbeb-public-table-date {
	text-align: left;
	vertical-align: top;
	white-space: nowrap;
	padding: 0.5em 1em 0.5em 0;
	font-weight: 600;
	color: var(--pbeb-date-color, inherit);
	font-size: calc(1em * var(--pbeb-date-scale, 1));
}

.pbeb-public-table-slots {
	vertical-align: top;
	padding: 0.5em 0;
}

.pbeb-public-table-slots .pbeb-public-slots {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
}

.pbeb-public-table-slots .pbeb-public-slot {
	border-bottom: none;
	padding: 0;
}

.pbeb-public-table-empty {
	opacity: 0.4;
}

/* 'next' layout — a compact "next event day" callout, deliberately small
 * so it drops into a sidebar/widget area rather than reading like a full
 * listing. Reuses .pbeb-public-slots/.pbeb-public-slot for the list of
 * bookings on that day. Structure only, same as the rest of this
 * stylesheet. */

.pbeb-public-next {
	padding: 0.8em 1em;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
}

.pbeb-public-next-label {
	margin: 0 0 0.2em;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.pbeb-public-next-date {
	margin: 0 0 0.3em;
	font-weight: 600;
	color: var(--pbeb-date-color, inherit);
	font-size: calc(1em * var(--pbeb-date-scale, 1));
}

.pbeb-public-next .pbeb-public-slot {
	border-bottom: none;
	padding: 0.15em 0;
}

/* Venue contact block (v0.22.14) — see PB_EB_Public::
 * render_venue_contact_block(). Deliberately plain/structural, matching
 * the rest of this stylesheet: no colour/size overrides of its own, so it
 * inherits whatever Display/Theme settings the surrounding
 * .pbeb-public-theme-wrap has already set as CSS custom properties. */
.pbeb-public-venue-contact {
	margin: 0 0 1.2em;
	padding-bottom: 0.8em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.pbeb-public-venue-name {
	margin: 0 0 0.3em;
	font-size: 1.3em;
}

.pbeb-public-venue-address {
	margin: 0 0 0.3em;
	opacity: 0.85;
}

.pbeb-public-venue-links {
	margin: 0;
	font-size: 0.95em;
}

.pbeb-public-venue-links a {
	color: inherit;
	text-decoration: underline;
}
