/* Booking card (placeholders/bookingcard.php), shown in place of the booking form when the booking checkout is on: the price, places left and the button that opens the checkout, or why the event cannot be booked. */
&.em-booking-card {
	box-sizing: border-box;
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid var(--border-color-softer);
	border-radius: 8px;
	// pixelbones gives its roots the page's transparent background, which the card docked over the page cannot have
	background-color: var(--background-color-inputs) !important;
	color: var(--text-color-normal);
	font-family: var(--font-family);
	font-size: var(--font-size);
	line-height: var(--line-height);
	-webkit-font-smoothing: antialiased;

	* {
		box-sizing: border-box;
	}

	.em-booking-card-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
	}

	.em-booking-card-info {
		min-width: 0;
	}

	.em-booking-card-price {
		color: var(--text-color-richer);
		font-size: 1.25em;
		font-weight: 600;
		line-height: 1.3;
	}

	.em-booking-card-note {
		color: var(--text-color-softer);
		font-size: 0.8125em;
	}

	a.em-booking-card-button,
	button.em-booking-card-button {
		display: inline-block;
		flex: none;
		min-width: 190px;
		height: 50px;
		margin: 0;
		padding: 0 26px;
		border: 0;
		border-radius: 5px;
		// pixelbones gives every link a transparent background
		background: var(--accent-color) !important;
		color: var(--button-primary-color) !important;
		font-family: var(--font-family);
		font-size: var(--font-size);
		font-weight: 600;
		line-height: 50px;
		text-align: center;
		text-decoration: none !important;
		white-space: nowrap;
		cursor: pointer;
		transition: background-color 0.15s ease;

		&:hover, &:focus {
			background: var(--accent-color-hover) !important;
		}

		&:focus-visible {
			outline: 2px solid var(--accent-color);
			outline-offset: 2px;
		}
	}

	.em-booking-card-message {
		margin-top: 10px;
		color: var(--text-color-normal);

		p {
			margin: 0;
		}

		a {
			color: var(--accent-color);
		}
	}

	&[data-state="open"] .em-booking-card-message,
	&[data-state="login"] .em-booking-card-message {
		color: var(--text-color-softer);
		font-size: 0.8125em;
	}

	// what the inline form would print above itself, in the checkout's banner look whatever markup the gateway or notice used
	.em-booking-card-notice {
		margin: 0 0 16px;
		padding: 12px 16px;
		border: 1px solid #1f4f8f;
		border-radius: 5px;
		background: #f2f6fd;
		color: var(--text-color-richer);

		&:focus,
		&:focus-visible {
			outline: none;
		}

		:is(.statusnotice, .em-notice, .em-booking-message, .notice) {
			margin: 0 !important;
			padding: 0 !important;
			border: 0 !important;
			border-radius: 0 !important;
			background: none !important;
			background-color: transparent !important;
			box-shadow: none !important;
			color: inherit !important;
			font: inherit !important;
		}

		ul, p {
			margin: 0 !important;
			padding: 0 !important;
			list-style: none !important;
		}

		li + li, p + p, .em-notice + .em-notice {
			margin-top: 4px !important;
		}

		a {
			color: inherit;
			text-decoration: underline;
		}
	}

	.em-booking-card-notice-success {
		position: relative;
		padding-inline-start: 44px;
		border-color: #1e6b37;
		background: #eef8f1;

		&::before {
			content: "";
			position: absolute;
			top: 13px;
			inset-inline-start: 16px;
			width: 18px;
			height: 18px;
			background-color: #1e6b37;
			-webkit-mask: var(--icon-checkmark-circle-filled) no-repeat center / 18px;
			mask: var(--icon-checkmark-circle-filled) no-repeat center / 18px;
		}
	}

	.em-booking-card-notice-error {
		border-color: #dd1d1d;
		background: #fff4f4;
	}

	.em-booking-card-notice-warning {
		border-color: #e0b400;
		background: #fff8e5;
	}

	@media (max-width: 640px) {
		a.em-booking-card-button,
		button.em-booking-card-button {
			min-width: 150px;
		}
	}

	// the tickets listed on the card when they are chosen on the event page (placeholders/bookingcard/tickets.php), then the total and the button
	.em-booking-card-tickets {
		margin: 0;

		.em-tickets-stepper {
			margin-bottom: 16px !important;
		}

		.em-booking-card-total-label {
			margin-bottom: 2px;
		}
	}

	// a copy of the card docked to the bottom of a phone screen while the card itself is still further down the page
	&.docked {
		position: fixed;
		z-index: 99990;
		right: 0;
		bottom: 0;
		left: 0;
		margin: 0;
		padding: 12px 16px;
		border-width: 1px 0 0;
		border-radius: 0;
		box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
		transform: translateY(110%);
		transition: transform 0.2s ease-out;

		&.active {
			transform: none;
		}

		@media (min-width: 641px) {
			display: none;
		}

		@media (prefers-reduced-motion: reduce) {
			transition: none;
		}
	}
}
