/**
 * WooFood Checkout Loading Overlay
 * Styles for the accept/decline order loading state on checkout.
 * Uses WooFood design tokens (primary color, text, shadows).
 */

/* Overlay: full-screen, centered, dimmed background */
.foodmaster-loading {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.45);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.foodmaster-loading.show {
	opacity: 1;
	visibility: visible;
}

/* Content card: white panel with shadow */
.foodmaster-loading .loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin: auto;
	padding: 1.75rem 2rem;
	max-width: 90%;
	width: auto;
	min-width: 200px;
	background: var(--foodmaster-background-color, #ffffff);
	color: var(--foodmaster-text-color, #333333);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
	border-radius: var(--foodmaster-button-radius, 8px);
	transform: scale(0.92);
	transition: transform 0.35s ease;
}

.foodmaster-loading .loading-content.show {
	transform: scale(1);
}

/* Spinner: circular progress using primary color */
.foodmaster-loading .spinner {
	display: block;
	width: 65px;
	height: 65px;
	flex-shrink: 0;
	animation: foodmaster-loading-rotator 1.4s linear infinite;
}

.foodmaster-loading .spinner .path {
	fill: none;
	stroke: var(--foodmaster-primary-color, #ff6b35);
	stroke-width: 6;
	stroke-linecap: round;
	stroke-dasharray: 187;
	stroke-dashoffset: 0;
	transform-origin: center;
	animation: foodmaster-loading-dash 1.4s ease-in-out infinite;
}

@keyframes foodmaster-loading-rotator {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(-270deg);
	}
}

@keyframes foodmaster-loading-dash {
	0% {
		stroke-dashoffset: 187;
	}
	50% {
		stroke-dashoffset: 46.75;
		transform: rotate(-135deg);
	}
	100% {
		stroke-dashoffset: 187;
		transform: rotate(-450deg);
	}
}

/* Message text */
.foodmaster-loading .loading-content .loading-text {
	text-align: center;
	color: var(--foodmaster-text-color, #333333);
	font-size: 0.9375rem;
	line-height: 1.45;
	margin-top: 1rem;
	padding: 0 0.25rem;
	max-width: 280px;
}
