/*
 * MOR Entry Sheet (raffle-advanced-plugin/modules/mor-entry).
 *
 * Everything is scoped under .mor-entry and written with enough specificity
 * to beat Elementor kit rules (e.g. `.elementor-kit-5 input:not([type=button])`
 * is 0,3,1) without !important — except display toggles, which must beat the
 * status rules' own !important.
 *
 * Colours: the accent is the org's primary colour Raffle Field
 * (--mor-orgprimarycolor, printed on :root by raffle-dynamic-fields.php).
 * Override any --mor-entry-* variable on .mor-entry from a site's custom CSS.
 */

.mor-entry {
	--mor-entry-accent: var(--mor-orgprimarycolor, #1f2f57);
	--mor-entry-accent-contrast: #fff;
	--mor-entry-ink: #111827;
	--mor-entry-muted: #6b7280;
	--mor-entry-line: #e5e7eb;
	--mor-entry-field-line: #d1d5db;
	--mor-entry-bg: #fff;
	--mor-entry-badge-bg: #f5c84c;
	--mor-entry-badge-ink: #1f2937;
	--mor-entry-error: #dc2626;
	--mor-entry-hint: #b45309;
	--mor-entry-radius: 14px;
	--mor-entry-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	position: fixed;
	inset: 0;
	z-index: 2147482000;
	display: block;
	/* Block themes' constrained layouts give every content child a max-width
	   and auto margins; the script also moves the sheet to <body> so a
	   transformed Elementor ancestor can't become its containing block. */
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.mor-entry[hidden],
.mor-entry [hidden] {
	display: none !important;
}

/* iOS Safari only sends clicks to elements that look clickable; Elementor
   puts custom classes on the widget wrapper, not the link. */
.mor-entry-open,
[data-mor-entry-open] {
	cursor: pointer;
}

html.mor-entry-locked,
html.mor-entry-locked body {
	overflow: hidden !important;
}

/* ---------- frame: full screen on phones, right-side sheet on wider screens ---------- */

.mor-entry .mor-entry__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.5);
	opacity: 0;
	transition: opacity 0.22s ease;
}

.mor-entry .mor-entry__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: var(--mor-entry-bg);
	color: var(--mor-entry-ink);
	transform: translateX(100%);
	transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
	outline: none;
	box-shadow: -12px 0 40px rgba(17, 24, 39, 0.18);
	-webkit-font-smoothing: antialiased;
}

.mor-entry.is-open .mor-entry__backdrop {
	opacity: 1;
}

.mor-entry.is-open .mor-entry__panel {
	transform: translateX(0);
}

@media (min-width: 640px) {
	.mor-entry .mor-entry__panel {
		width: 460px;
		border-radius: 18px 0 0 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mor-entry .mor-entry__backdrop,
	.mor-entry .mor-entry__panel {
		transition: none;
	}
}

.mor-entry .mor-entry__panel,
.mor-entry .mor-entry__panel * {
	box-sizing: border-box;
	font-family: var(--mor-entry-font);
}

/* ---------- header ---------- */

.mor-entry .mor-entry__head {
	flex: none;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--mor-entry-line);
}

.mor-entry .mor-entry__logo {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	border: 1px solid var(--mor-entry-line);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

.mor-entry .mor-entry__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	margin: 0;
	border: 0;
	border-radius: 0;
	max-width: none;
}

.mor-entry .mor-entry__logo span {
	font-size: 18px;
	font-weight: 700;
	color: var(--mor-entry-accent);
	text-transform: uppercase;
}

.mor-entry .mor-entry__heading {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mor-entry .mor-entry__org,
.mor-entry .mor-entry__raffle {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.mor-entry .mor-entry__org {
	font-size: 14px;
	color: var(--mor-entry-muted);
}

.mor-entry .mor-entry__raffle {
	font-size: 17px;
	font-weight: 600;
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry__panel button.mor-entry__close {
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--mor-entry-ink);
	border: 1px solid var(--mor-entry-line);
	border-radius: 12px;
	box-shadow: none;
	cursor: pointer;
}

.mor-entry .mor-entry__panel button.mor-entry__close:hover,
.mor-entry .mor-entry__panel button.mor-entry__close:focus-visible {
	background: #f9fafb;
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry__icon {
	width: 20px;
	height: 20px;
	flex: none;
	display: inline-block;
	vertical-align: -4px;
}

/* ---------- progress ---------- */

.mor-entry .mor-entry__panel .mor-entry__steps {
	flex: none;
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 16px 20px 0;
}

.mor-entry .mor-entry__panel .mor-entry__step {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mor-entry .mor-entry__bar {
	display: block;
	height: 4px;
	border-radius: 4px;
	background: var(--mor-entry-line);
}

.mor-entry .mor-entry__steplabel {
	font-size: 14px;
	color: var(--mor-entry-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mor-entry .mor-entry__steplabel .mor-entry__icon {
	display: none;
	width: 15px;
	height: 15px;
	margin-right: 3px;
	vertical-align: -2px;
}

.mor-entry[data-view="info"] .mor-entry__step[data-step="info"] .mor-entry__bar,
.mor-entry[data-view="tickets"] .mor-entry__step[data-step="info"] .mor-entry__bar,
.mor-entry[data-view="tickets"] .mor-entry__step[data-step="tickets"] .mor-entry__bar {
	background: var(--mor-entry-accent);
}

.mor-entry[data-view="info"] .mor-entry__step[data-step="info"] .mor-entry__steplabel,
.mor-entry[data-view="tickets"] .mor-entry__step[data-step="tickets"] .mor-entry__steplabel {
	color: var(--mor-entry-ink);
	font-weight: 600;
}

.mor-entry[data-view="tickets"] .mor-entry__step[data-step="info"] .mor-entry__icon {
	display: inline-block;
}

/* ---------- body + views ---------- */

.mor-entry .mor-entry__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 22px 20px 24px;
}

.mor-entry [data-mor-entry-view] {
	display: none;
}

.mor-entry[data-view="info"] [data-mor-entry-view="info"],
.mor-entry[data-view="tickets"] [data-mor-entry-view="tickets"],
.mor-entry[data-view="waitlist-done"] [data-mor-entry-view="waitlist-done"] {
	display: block;
}

.mor-entry .mor-entry__panel .mor-entry__title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 28px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--mor-entry-ink);
}

@media (min-width: 640px) {
	.mor-entry .mor-entry__panel .mor-entry__title {
		font-size: 32px;
	}
}

.mor-entry .mor-entry__panel .mor-entry__sub {
	margin: 0 0 22px;
	font-size: 17px;
	line-height: 1.5;
	color: var(--mor-entry-muted);
	text-transform: none;
	letter-spacing: normal;
}

.mor-entry .mor-entry__panel .mor-entry__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #f3f4f6;
	color: var(--mor-entry-ink);
	font-size: 14px;
	font-weight: 600;
}

.mor-entry .mor-entry__pill .mor-entry__icon {
	width: 16px;
	height: 16px;
}

/* ---------- form ---------- */

.mor-entry .mor-entry__panel .mor-entry__form {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mor-entry .mor-entry__panel .mor-entry__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 500;
	color: var(--mor-entry-ink);
	cursor: default;
}

.mor-entry .mor-entry__panel .mor-entry__label {
	font-size: 16px;
	font-weight: 500;
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry__panel .mor-entry__form input.mor-entry__input {
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 16px;
	font-size: 18px;
	line-height: 1.2;
	font-weight: 400;
	color: var(--mor-entry-ink);
	background: #fff;
	border: 1.5px solid var(--mor-entry-field-line);
	border-radius: 12px;
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mor-entry .mor-entry__panel .mor-entry__form input.mor-entry__input::placeholder {
	color: #9ca3af;
	opacity: 1;
}

.mor-entry .mor-entry__panel .mor-entry__form input.mor-entry__input:focus {
	border-color: var(--mor-entry-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mor-entry-accent) 18%, transparent);
}

.mor-entry .mor-entry__panel .mor-entry__field.is-invalid input.mor-entry__input {
	border-color: var(--mor-entry-error);
}

.mor-entry .mor-entry__panel .mor-entry__field.is-hint input.mor-entry__input {
	border-color: var(--mor-entry-hint);
}

.mor-entry .mor-entry__error {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--mor-entry-error);
}

.mor-entry .mor-entry__error:empty {
	display: none;
}

.mor-entry .mor-entry__field.is-hint .mor-entry__error {
	color: var(--mor-entry-hint);
}

.mor-entry .mor-entry__panel .mor-entry__consent {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--mor-entry-muted);
}

.mor-entry .mor-entry__hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mor-entry .mor-entry__panel button.mor-entry__link {
	display: inline;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	color: var(--mor-entry-accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.mor-entry .mor-entry__field.is-hint button.mor-entry__link {
	color: var(--mor-entry-hint);
}

/* ---------- tickets ---------- */

.mor-entry .mor-entry__panel .mor-entry__who {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: -8px 0 16px;
	font-size: 15px;
	color: var(--mor-entry-muted);
}

.mor-entry .mor-entry__who span {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mor-entry .mor-entry__who strong {
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry__pkgs {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mor-entry .mor-entry__panel a.mor-entry-pkg {
	display: block;
	position: relative;
	color: var(--mor-entry-ink);
	text-decoration: none;
	background: #fff;
	border: 1.5px solid var(--mor-entry-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.mor-entry .mor-entry__panel a.mor-entry-pkg:hover,
.mor-entry .mor-entry__panel a.mor-entry-pkg:focus-visible {
	color: var(--mor-entry-ink);
	border-color: color-mix(in srgb, var(--mor-entry-accent) 55%, var(--mor-entry-line));
	box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
	transform: translateY(-1px);
	outline: none;
}

.mor-entry .mor-entry__panel a.mor-entry-pkg.is-best {
	border: 2px solid var(--mor-entry-accent);
}

.mor-entry .mor-entry-pkg__flag {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 20px;
	background: var(--mor-entry-accent);
	color: var(--mor-entry-accent-contrast);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mor-entry .mor-entry-pkg__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
}

.mor-entry .mor-entry-pkg__price {
	flex: none;
	min-width: 66px;
	padding-right: 14px;
	border-right: 1.5px dashed var(--mor-entry-field-line);
	font-size: 30px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--mor-entry-ink);
	white-space: nowrap;
}

.mor-entry .mor-entry-pkg__price small {
	font-size: 15px;
	font-weight: 600;
	color: var(--mor-entry-muted);
	letter-spacing: 0;
}

/* Recurring package: "/month" under the amount, so the price column stays
   as narrow as a one-time one and the ticket count keeps its room. */
.mor-entry .mor-entry-pkg.is-recurring .mor-entry-pkg__price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
}

.mor-entry .mor-entry-pkg.is-recurring .mor-entry-pkg__price small {
	font-size: 13px;
	line-height: 1;
}

.mor-entry .mor-entry-pkg__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Wrap between words rather than cutting text off ("35 tickets every month"
   next to a % badge on a phone, a wide site font). */
.mor-entry .mor-entry-pkg__info strong,
.mor-entry .mor-entry-pkg__info span {
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
}

.mor-entry .mor-entry-pkg__info strong {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry-pkg__info span {
	font-size: 14px;
	line-height: 1.3;
	color: var(--mor-entry-muted);
}

/* Club subscription sold next to one-time tickets: two labelled groups. */
.mor-entry .mor-entry__group + .mor-entry__group {
	margin-top: 26px;
}

.mor-entry .mor-entry__panel .mor-entry__group-title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry__panel .mor-entry__group-title:has(+ .mor-entry__group-sub) {
	margin-bottom: 4px;
}

.mor-entry .mor-entry__panel .mor-entry__group-sub {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--mor-entry-muted);
}

.mor-entry .mor-entry__panel .mor-entry__group--club a.mor-entry-pkg {
	border: 2px solid var(--mor-entry-accent);
}

.mor-entry .mor-entry-pkg__badge {
	flex: none;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--mor-entry-badge-bg);
	color: var(--mor-entry-badge-ink);
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
}

.mor-entry .mor-entry-pkg__go {
	flex: none;
	display: inline-flex;
	align-items: center;
	color: var(--mor-entry-muted);
}

.mor-entry .mor-entry-pkg__wait {
	display: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--mor-entry-ink);
	white-space: nowrap;
}

.mor-entry .mor-entry-pkg.is-loading .mor-entry-pkg__wait {
	display: inline;
}

.mor-entry .mor-entry-pkg.is-loading .mor-entry-pkg__go .mor-entry__icon,
.mor-entry .mor-entry-pkg.is-loading .mor-entry-pkg__badge {
	display: none;
}

.mor-entry.is-navigating .mor-entry__panel a.mor-entry-pkg:not(.is-loading) {
	opacity: 0.45;
	pointer-events: none;
}

.mor-entry .mor-entry__panel .mor-entry__footnote {
	margin: 18px 0 0;
	text-align: center;
	font-size: 15px;
	color: var(--mor-entry-muted);
}

@media (max-width: 380px) {
	.mor-entry .mor-entry-pkg__row {
		gap: 10px;
		padding: 14px;
	}
	.mor-entry .mor-entry-pkg__price {
		min-width: 54px;
		padding-right: 10px;
		font-size: 26px;
	}
	.mor-entry .mor-entry-pkg__info strong {
		font-size: 16px;
	}
}

/* ---------- waitlist confirmation / closed ---------- */

.mor-entry .mor-entry__view--done,
.mor-entry .mor-entry__view--closed {
	text-align: center;
	padding-top: 24px;
	outline: none;
}

.mor-entry .mor-entry__done-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mor-entry-accent) 12%, #fff);
	color: var(--mor-entry-accent);
}

.mor-entry .mor-entry__done-icon .mor-entry__icon {
	width: 32px;
	height: 32px;
}

/* ---------- footer ---------- */

.mor-entry .mor-entry__foot {
	flex: none;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 20px max(12px, env(safe-area-inset-bottom));
	border-top: 1px solid var(--mor-entry-line);
	background: var(--mor-entry-bg);
	/* The bar sits on top of the list: a soft upward shadow says "this
	   scrolls underneath", a bit stronger while more is hidden below. */
	box-shadow: 0 -6px 16px -8px rgba(17, 24, 39, 0.16);
	transition: box-shadow 0.2s ease;
}

.mor-entry.has-more .mor-entry__foot {
	box-shadow: 0 -10px 22px -8px rgba(17, 24, 39, 0.3);
}

.mor-entry .mor-entry__foot .mor-entry__btn[data-mor-entry-for] {
	display: none;
}

.mor-entry[data-view="info"] .mor-entry__foot .mor-entry__btn[data-mor-entry-for="info"],
.mor-entry[data-view="tickets"] .mor-entry__foot .mor-entry__btn[data-mor-entry-for="tickets"],
.mor-entry[data-view="waitlist-done"] .mor-entry__foot .mor-entry__btn[data-mor-entry-for="waitlist-done"] {
	display: inline-flex;
}

.mor-entry .mor-entry__panel .mor-entry__btn {
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 0 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	border-radius: 12px;
	border: 1.5px solid var(--mor-entry-field-line);
	background: #fff;
	color: var(--mor-entry-ink);
	box-shadow: none;
	cursor: pointer;
	transition: filter 0.15s ease, background-color 0.15s ease;
}

.mor-entry .mor-entry__panel .mor-entry__btn:hover,
.mor-entry .mor-entry__panel .mor-entry__btn:focus-visible {
	background: #f9fafb;
	color: var(--mor-entry-ink);
}

.mor-entry .mor-entry__panel .mor-entry__btn--primary,
.mor-entry .mor-entry__panel .mor-entry__btn--primary:hover,
.mor-entry .mor-entry__panel .mor-entry__btn--primary:focus-visible {
	background: var(--mor-entry-accent);
	border-color: var(--mor-entry-accent);
	color: var(--mor-entry-accent-contrast);
}

.mor-entry .mor-entry__panel .mor-entry__btn--primary:hover {
	filter: brightness(1.08);
}

.mor-entry .mor-entry__btn > span {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.mor-entry .mor-entry__view--closed .mor-entry__btn {
	width: auto;
	margin-top: 8px;
}

.mor-entry .mor-entry__panel .mor-entry__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 18px;
	list-style: none;
	margin: 2px 0 0;
	padding: 0;
}

.mor-entry .mor-entry__panel .mor-entry__trust li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: var(--mor-entry-muted);
	white-space: nowrap;
}

.mor-entry .mor-entry__trust .mor-entry__icon {
	width: 16px;
	height: 16px;
}

/* Phones: one line of trust items — the row reaches into the side padding,
   with tighter gaps and type. */
@media (max-width: 639px) {
	.mor-entry .mor-entry__panel .mor-entry__trust {
		justify-content: space-between;
		gap: 4px 8px;
		margin: 2px -10px 0;
	}
	.mor-entry .mor-entry__panel .mor-entry__trust li {
		gap: 4px;
		/* entry.js steps this down only if the row would wrap */
		font-size: var(--mor-entry-trust-size, 12px);
		letter-spacing: -0.01em;
	}
	.mor-entry .mor-entry__trust .mor-entry__icon {
		width: 14px;
		height: 14px;
	}
}
