/* Card payment step (template-parts/booking/payment-step.php) */

/* .btn-book sets display:flex, which would otherwise override the hidden attribute. */
#smt-payment [hidden] {
	display: none !important;
}

.smt-pay-step {
	scroll-margin-top: 120px;
}

.smt-pay-step .booking-content {
	margin-bottom: 30px;
}

.smt-pay-step__saved {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: 12px;
	background-color: #eaf7ef;
	color: #14532d;
	font-size: 15px;
	line-height: 1.5;
}

.smt-pay-step__saved svg {
	flex: 0 0 20px;
	margin-top: 1px;
}

.smt-pay-step__secure {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin-bottom: 14px;
	color: #374151;
	font-size: 14px;
	font-weight: 700;
}

.smt-pay-step__brands {
	display: inline-flex;
	gap: 6px;
	margin-left: auto;
}

.smt-pay-step__brand {
	width: 44px;
	height: 28px;
	border: 1px solid #e4e6e8;
	border-radius: 5px;
	background: #fff;
}

.smt-pay-step__buttons:empty {
	display: none;
}

.smt-pay-step__buttons {
	margin-bottom: 14px;
}

.smt-pay-step__form {
	position: relative;
	min-height: 240px;
	padding: 20px;
	border: 1px solid #e4e6e8;
	border-radius: 14px;
	background: #fff;
}

/* Shown until Cybersource draws the card fields inside the box. */
.smt-pay-step__form:empty:not(.is-ready)::before {
	content: "";
	position: absolute;
	top: 70px;
	left: 50%;
	width: 34px;
	height: 34px;
	margin-left: -17px;
	border: 3px solid #d7eef4;
	border-top-color: #00a5c8;
	border-radius: 50%;
	animation: smt-pay-spin 0.8s linear infinite;
}

.smt-pay-step__form:empty:not(.is-ready)::after {
	content: "Loading secure card form…";
	position: absolute;
	top: 122px;
	left: 0;
	right: 0;
	color: #6b7280;
	font-size: 14px;
	text-align: center;
}

.smt-pay-step__note {
	display: flex;
	gap: 8px;
	margin: 16px 0 0;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.55;
}

.smt-pay-step__note svg {
	flex: 0 0 14px;
	margin-top: 2px;
}

.smt-pay-step__summary .smt-pay-step__trip {
	margin-bottom: 4px;
	color: #111827;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.smt-pay-step__summary .smt-pay-step__meta {
	margin-bottom: 16px;
	color: #6b7280;
	font-size: 14px;
}

.smt-pay-step__ref {
	margin: 16px 0 0;
	color: #6b7280;
	font-size: 13px;
}

/* Admin preview when the real card form cannot load yet. */
.smt-pay-step__form--preview {
	border-style: dashed;
}

.smt-pay-step__preview-badge {
	position: absolute;
	top: -11px;
	left: 16px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #df6326;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.smt-pay-mock {
	display: grid;
	gap: 12px;
}

.smt-pay-mock__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.smt-pay-mock__field {
	padding: 10px 12px;
	border: 1px solid #e4e6e8;
	border-radius: 8px;
	background: #fafafa;
}

.smt-pay-mock__field span {
	display: block;
	margin-bottom: 4px;
	color: #6b7280;
	font-size: 12px;
}

.smt-pay-mock__field b {
	color: #9ca3af;
	font-weight: 500;
	letter-spacing: 0.04em;
}

.smt-pay-mock__button {
	padding: 12px;
	border-radius: 8px;
	background: #00a5c8;
	color: #fff;
	font-weight: 700;
	text-align: center;
	opacity: 0.7;
}

.smt-pay-step__preview-note {
	margin-top: 14px;
	padding: 12px 14px;
	border: 1px solid #fed7aa;
	border-radius: 10px;
	background: #fff7ed;
	color: #7c2d12;
	font-size: 13px;
	line-height: 1.6;
}

/* Status messages */
.smt-payment__status {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-radius: 10px;
	background-color: #eef4fb;
	color: #1f4d56;
	font-size: 15px;
	line-height: 1.5;
}

.smt-payment__status.is-error {
	background-color: #fdecec;
	color: #a12622;
}

.smt-pay-step__panel > .smt-payment__status.is-error:first-of-type {
	margin: 0 0 20px;
}

#smt-payment.is-busy .smt-pay-step__form {
	opacity: 0.4;
	pointer-events: none;
}

/* Paid / confirming / review states */
.smt-pay-state {
	padding: 20px 10px;
	text-align: center;
}

.smt-pay-state h3 {
	margin-bottom: 12px;
}

.smt-pay-state p {
	max-width: 520px;
	margin: 0 auto 10px;
	line-height: 1.6;
}

.smt-pay-state__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
	border-radius: 50%;
	font-size: 28px;
	font-weight: 700;
}

.smt-pay-state--paid .smt-pay-state__icon {
	background: #e6f6ec;
	color: #16a34a;
}

.smt-pay-state--wait .smt-pay-state__icon {
	background: #e6f6fa;
}

.smt-pay-state--review .smt-pay-state__icon {
	background: #fff4e5;
	color: #df6326;
}

.smt-pay-state__spinner {
	width: 30px;
	height: 30px;
	border: 3px solid #cdeef5;
	border-top-color: #00a5c8;
	border-radius: 50%;
	animation: smt-pay-spin 0.8s linear infinite;
}

@keyframes smt-pay-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 575px) {
	.smt-pay-step__brands {
		margin-left: 0;
	}

	.smt-pay-mock__row {
		grid-template-columns: 1fr;
	}
}

/* Booking form: ignore extra clicks on "Book Now" while the booking is being sent. */
.wpcf7-form.submitting .wpcf7-submit {
	pointer-events: none;
	opacity: 0.6;
	cursor: progress;
}
