/**
 * OSM — Make a Night of It
 *
 * Every colour, font, radius and shadow comes from the variables main.css
 * declares and the Customizer overrides at runtime. Nothing is hardcoded, so
 * changing the palette in the Customizer changes this too — which matters,
 * because the live Customizer values are not the same as main.css's defaults.
 *
 * Loaded after osm-main so these rules win on equal specificity.
 *
 * @since 1.25.0
 */

/* -------------------------------------------------------------------------
 * On after
 * ---------------------------------------------------------------------- */

.osm-your-night__route-guidance { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--osm-border); }
.osm-your-night__route-guidance summary { cursor: pointer; font-weight: 700; padding: .75rem 0; }
.osm-your-night__route-guidance li { margin: 1rem 0; }
.osm-your-night__route-guidance p { margin: .6rem 0; overflow-wrap: anywhere; }

.osm-on-after {
	margin: 2.5rem 0 0;
	padding: 1.5rem;
	background: var(--osm-cream);
	border: 1px solid var(--osm-border);
	border-radius: var(--osm-radius);
}

.osm-on-after__heading {
	margin: 0 0 1rem;
	font-family: var(--osm-font-display);
	font-size: 1.25rem;
	color: var(--osm-text);
}

.osm-on-after__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 1rem;
}

.osm-on-after__item {
	padding: 0.9rem 1rem;
	background: #fff;
	border: 1px solid var(--osm-border);
	border-left: 4px solid var(--osm-coral);
	border-radius: var(--osm-radius-sm);
	box-shadow: var(--osm-shadow-card);
}

.osm-on-after__line {
	margin: 0;
	color: var(--osm-text);
	line-height: 1.55;
}

.osm-on-after__route {
	margin: 0.4rem 0 0;
	font-size: 0.85rem;
	color: var(--osm-text-muted);
}

.osm-on-after__actions {
	margin: 0.75rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.osm-on-after__link {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	background: var(--osm-coral);
	color: #fff;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.osm-on-after__link:hover,
.osm-on-after__link:focus {
	background: var(--osm-navy);
	color: #fff;
}

.osm-on-after__attribution,
.osm-night-attribution,
.osm-near-here__attribution {
	margin: 1rem 0 0;
	font-size: 0.78rem;
	color: var(--osm-text-muted);
}

/* -------------------------------------------------------------------------
 * Save button
 *
 * Always renders unsaved. The saved state is applied by JS on load, because
 * server HTML has to be identical for everyone or a page cache will hand one
 * visitor's saved gigs to the next. The transition covers that handover.
 *
 * On a card it sits in the wrapper, NOT inside the card's own <a> — a button
 * inside an anchor is invalid and the click would never reach it.
 * ---------------------------------------------------------------------- */

.osm-night-save {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.85rem;
	background: #fff;
	color: var(--osm-text);
	border: 1px solid var(--osm-border);
	border-radius: 999px;
	font-family: var(--osm-font-body);
	font-size: 0.82rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.osm-night-save:hover,
.osm-night-save:focus-visible {
	border-color: var(--osm-coral);
	color: var(--osm-coral);
}

.osm-night-save__icon {
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: no-repeat center / contain;
	mask: no-repeat center / contain;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.6 4.6 0 0 1 8-3 4.6 4.6 0 0 1 8 3c0 5.8-8 11-8 11z' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.6 4.6 0 0 1 8-3 4.6 4.6 0 0 1 8 3c0 5.8-8 11-8 11z' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E");
	flex: 0 0 auto;
}

.osm-night-save[aria-pressed="true"] {
	background: var(--osm-coral);
	border-color: var(--osm-coral);
	color: #fff;
}

.osm-night-save[aria-pressed="true"] .osm-night-save__icon {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.6 4.6 0 0 1 8-3 4.6 4.6 0 0 1 8 3c0 5.8-8 11-8 11z' fill='%23000'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.6 4.6 0 0 1 8-3 4.6 4.6 0 0 1 8 3c0 5.8-8 11-8 11z' fill='%23000'/%3E%3C/svg%3E");
}

.osm-night-save--single {
	padding: 0.55rem 1.15rem;
	font-size: 0.95rem;
	margin-top: 1.25rem;
}

/* Card wrapper — only ever output when the button is actually rendered, so
   with saving switched off the card markup is byte-identical to before. */
.osm-gig-card-wrap {
	position: relative;
	display: block;
}

.osm-night-save--card {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 3;
	padding: 0.3rem 0.6rem;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: var(--osm-shadow-card);
}

.osm-night-save--card .osm-night-save__text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.osm-night-save {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Floating "Your night" pill
 *
 * Floating rather than in the header because .osm-header__cta is hidden
 * below the mobile breakpoint — and a gig-goer standing in a pub is on a
 * phone. No mobile tab bar is rendered, so nothing collides here.
 * ---------------------------------------------------------------------- */

.osm-night-pill {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.1rem;
	background: var(--osm-navy);
	color: var(--osm-cream);
	border-radius: 999px;
	font-family: var(--osm-font-body);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--osm-shadow-hover);
}

.osm-night-pill:hover,
.osm-night-pill:focus {
	background: var(--osm-coral);
	color: #fff;
}

.osm-night-pill[hidden] {
	display: none;
}

.osm-night-pill__count {
	display: inline-grid;
	place-items: center;
	min-width: 1.4rem;
	height: 1.4rem;
	padding: 0 0.35rem;
	background: var(--osm-coral);
	color: #fff;
	border-radius: 999px;
	font-size: 0.78rem;
}

.osm-night-pill:hover .osm-night-pill__count,
.osm-night-pill:focus .osm-night-pill__count {
	background: var(--osm-navy);
}

/* -------------------------------------------------------------------------
 * Your Night
 * ---------------------------------------------------------------------- */

.osm-your-night,
.osm-near-here {
	padding: 2.5rem 0 4rem;
}

.osm-your-night__inner,
.osm-near-here__inner {
	max-width: 46rem;
	margin: 0 auto;
}

/* The theme has no eyebrow class, so this is ours. Buttons use the theme's
   existing .osm-btn--coral / --ghost modifiers rather than new ones. */
.osm-night-eyebrow {
	display: inline-block;
	margin: 0 0 0.75rem;
	padding: 0.25rem 0.75rem;
	background: var(--osm-coral);
	color: var(--osm-cream);
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.osm-your-night__title,
.osm-near-here__title {
	margin: 0 0 0.75rem;
	font-family: var(--osm-font-display);
	font-size: clamp(1.9rem, 5vw, 2.6rem);
	line-height: 1.15;
	color: var(--osm-text);
}

.osm-your-night__intro,
.osm-near-here__lead {
	color: var(--osm-text-muted);
	line-height: 1.6;
}

.osm-your-night__shared {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	background: var(--osm-cream);
	border: 1px solid var(--osm-yellow);
	border-radius: var(--osm-radius);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
}

.osm-your-night__shared[hidden] {
	display: none;
}

.osm-your-night__shared-text {
	margin: 0;
	font-weight: 600;
	color: var(--osm-text);
}

.osm-night-day {
	margin: 2rem 0 0;
}

.osm-night-day__heading {
	margin: 0 0 0.9rem;
	font-family: var(--osm-font-display);
	font-size: 1.15rem;
	color: var(--osm-text);
}

.osm-night-stop {
	position: relative;
	padding: 1rem 1.1rem;
	background: #fff;
	border: 1px solid var(--osm-border);
	border-left: 4px solid var(--osm-coral);
	border-radius: var(--osm-radius);
	box-shadow: var(--osm-shadow-card);
}

.osm-night-stop__time {
	display: block;
	font-weight: 700;
	color: var(--osm-text);
}

.osm-night-stop__time--unknown {
	color: var(--osm-text-muted);
	font-weight: 600;
}

.osm-night-stop__until {
	font-weight: 400;
	color: var(--osm-text-muted);
}

.osm-night-stop__act {
	margin: 0.15rem 0 0.1rem;
	font-family: var(--osm-font-display);
	font-size: 1.1rem;
}

.osm-night-stop__act a {
	color: var(--osm-text);
	text-decoration: none;
}

.osm-night-stop__act a:hover,
.osm-night-stop__act a:focus {
	color: var(--osm-coral);
}

.osm-night-stop__venue {
	margin: 0;
	font-size: 0.9rem;
	color: var(--osm-text-muted);
}

.osm-night-stop__remove {
	position: absolute;
	top: 0.75rem;
	right: 0.85rem;
	background: none;
	border: 0;
	padding: 0.2rem;
	font-family: var(--osm-font-body);
	font-size: 0.78rem;
	color: var(--osm-text-muted);
	cursor: pointer;
	text-decoration: underline;
}

.osm-night-stop__remove:hover,
.osm-night-stop__remove:focus-visible {
	color: var(--osm-coral);
}

.osm-night-connector {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0 0.55rem 1.1rem;
	font-size: 0.85rem;
	color: var(--osm-text-muted);
}

.osm-night-connector::before {
	content: "";
	width: 2px;
	height: 1.6rem;
	background: var(--osm-border);
	flex: 0 0 auto;
}

.osm-night-connector--close {
	color: var(--osm-text);
	padding: 0.75rem 1rem;
	margin: 0.5rem 0;
	background: var(--osm-pale-cream);
	border-left: 3px solid var(--osm-yellow);
	border-radius: var(--osm-radius-sm);
}

.osm-night-connector--close::before {
	display: none;
}

.osm-your-night__empty {
	margin: 2.5rem 0;
	padding: 2rem 1.5rem;
	text-align: center;
	background: var(--osm-cream);
	border: 1px dashed var(--osm-border);
	border-radius: var(--osm-radius);
}

.osm-your-night__empty[hidden] {
	display: none;
}

.osm-your-night__empty h2 {
	margin: 0 0 0.5rem;
	font-family: var(--osm-font-display);
	color: var(--osm-text);
}

.osm-your-night__empty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
	margin-top: 1.25rem;
}

.osm-your-night__share {
	margin: 2.5rem 0 0;
	padding: 1.25rem;
	background: var(--osm-cream);
	border: 1px solid var(--osm-border);
	border-radius: var(--osm-radius);
}

.osm-your-night__share[hidden] {
	display: none;
}

.osm-your-night__share-title {
	margin: 0 0 0.35rem;
	font-family: var(--osm-font-display);
	font-size: 1.1rem;
	color: var(--osm-text);
}

.osm-your-night__share-help {
	margin: 0 0 0.9rem;
	font-size: 0.88rem;
	color: var(--osm-text-muted);
}

.osm-your-night__share-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.osm-your-night__share-url {
	flex: 1 1 16rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--osm-border);
	border-radius: 999px;
	font-family: var(--osm-font-body);
	font-size: 0.85rem;
	color: var(--osm-text);
	background: #fff;
}

.osm-your-night__share-status {
	margin: 0.6rem 0 0;
	font-size: 0.85rem;
	color: var(--osm-mint);
	font-weight: 600;
	min-height: 1.2em;
}

/* -------------------------------------------------------------------------
 * Venue dashboard — saved counts
 * ---------------------------------------------------------------------- */

.osm-dash-table__saves {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	font-weight: 600;
	color: var(--osm-coral);
	cursor: help;
}

/* -------------------------------------------------------------------------
 * Near here
 * ---------------------------------------------------------------------- */

.osm-near-here__list {
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.85rem;
}

.osm-near-here__item {
	padding: 1rem 1.1rem;
	background: #fff;
	border: 1px solid var(--osm-border);
	border-left: 4px solid var(--osm-blue);
	border-radius: var(--osm-radius);
	box-shadow: var(--osm-shadow-card);
}

.osm-near-here__when {
	margin: 0 0 0.3rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: baseline;
}

.osm-near-here__time {
	font-weight: 700;
	color: var(--osm-text);
}

.osm-near-here__walk {
	font-size: 0.85rem;
	color: var(--osm-text-muted);
}

.osm-near-here__act {
	margin: 0 0 0.15rem;
	font-family: var(--osm-font-display);
	font-size: 1.15rem;
}

.osm-near-here__act a {
	color: var(--osm-text);
	text-decoration: none;
}

.osm-near-here__act a:hover,
.osm-near-here__act a:focus {
	color: var(--osm-coral);
}

.osm-near-here__venue {
	margin: 0;
	font-size: 0.9rem;
	color: var(--osm-text-muted);
}

.osm-near-here__route {
	margin: 0.4rem 0 0;
	font-size: 0.82rem;
	color: var(--osm-text-muted);
}
