/* =========================================================
   Book Test Ride — validation states, spinner, toast
   Glide Theme
   ========================================================= */

/* ---- Field invalid states ---- */
#testRideForm .form-control.is-invalid,
#testRideForm .form-select.is-invalid {
	border-color: #e03131;
	box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.12);
}

#testRideForm .input-group:has(.is-invalid) .input-group-text {
	border-color: #e03131;
}

#testRideForm .field-error {
	color: #e03131;
	font-size: 12px;
	font-weight: 500;
	margin-top: 6px;
	line-height: 1.4;
	animation: glideErrorIn 0.2s ease;
}

@keyframes glideErrorIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Radio "timing card" group invalid state */
#testRideForm .custom-timing-radio-group.is-invalid-group .timing-card {
	border-color: #e03131 !important;
}

/* ---- Submit button spinner ---- */
.btn-action-submit:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

.glide-spinner {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	vertical-align: -2px;
	animation: glideSpin 0.7s linear infinite;
}

@keyframes glideSpin {
	to { transform: rotate(360deg); }
}

/* ---- Toast notification ---- */
.glide-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	left: auto;
	max-width: 380px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #fff;
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	border-left: 4px solid #16a34a;
	z-index: 99999;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.glide-toast-show {
	opacity: 1;
	transform: translateY(0);
}

.glide-toast-error {
	border-left-color: #e03131;
}

.glide-toast-icon {
	flex-shrink: 0;
	line-height: 0;
	color: #16a34a;
	margin-top: 1px;
}

.glide-toast-error .glide-toast-icon {
	color: #e03131;
}

.glide-toast-message {
	flex: 1;
	font-size: 13.5px;
	line-height: 1.5;
	color: #1f2937;
}

.glide-toast-close {
	background: none;
	border: none;
	color: #9ca3af;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin-left: 4px;
}

.glide-toast-close:hover {
	color: #4b5563;
}

@media (max-width: 480px) {
	.glide-toast {
		left: 16px;
		right: 16px;
		bottom: 16px;
		max-width: none;
	}
}