/* RBX Tour Products - THE modal (RBXTP.modal, assets/js/modal.js): cart Edit and booking popup. Variables are scoped (never :root). */

.rbx-tp-modal-backdrop {
	--rbx-bg: #ffffff;
	--rbx-fg: #1d2327;
	--rbx-muted: #50575e;
	--rbx-line: #dcdcde;
	--rbx-accent: #1d4ed8;
	--rbx-shade: rgba(15, 23, 42, 0.55);
}

@media (prefers-color-scheme: dark) {
	.rbx-tp-modal-backdrop {
		--rbx-bg: #1e2227;
		--rbx-fg: #f0f0f1;
		--rbx-muted: #b5bcc4;
		--rbx-line: #3c434a;
		--rbx-accent: #8ab4ff;
		--rbx-shade: rgba(0, 0, 0, 0.7);
	}
}

html.rbx-tp-modal-open {
	overflow: hidden;
}

.rbx-tp-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 16px;
	overflow-y: auto;
	background: var(--rbx-shade);
}

.rbx-tp-modal {
	box-sizing: border-box;
	/* Sized to the buy box: .bb max-width 400px + body padding 18px x2 + 1px border x2 = 438px. */
	width: min(438px, calc(100vw - 32px));
	margin: 0 auto;
	background: var(--rbx-bg);
	color: var(--rbx-fg);
	border: 1px solid var(--rbx-line);
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
	outline: none;
}

.rbx-tp-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--rbx-line);
}

.rbx-tp-modal-title {
	margin: 0;
	font-size: 1.2em;
	line-height: 1.3;
	color: inherit;
}

.rbx-tp-modal-close {
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--rbx-fg);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
}

.rbx-tp-modal-close:hover,
.rbx-tp-modal-close:focus-visible {
	border-color: var(--rbx-line);
	background: transparent;
	color: var(--rbx-fg);
}

.rbx-tp-modal-close:focus-visible,
.rbx-tp-modal .rbx-tp-modal-fallback:focus-visible {
	outline: 2px solid var(--rbx-accent);
	outline-offset: 2px;
}

.rbx-tp-modal-body {
	padding: 18px;
}

.rbx-tp-modal-error {
	margin: 0 0 0.75em;
}

@media (prefers-reduced-motion: no-preference) {
	.rbx-tp-modal {
		animation: rbx-tp-pop 0.12s ease-out;
	}
}

@keyframes rbx-tp-pop {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 600px) {
	.rbx-tp-modal-backdrop {
		padding: 0;
	}

	.rbx-tp-modal {
		width: 100%;
		min-height: 100%;
		border-radius: 0;
		border-width: 0;
	}
}
