/* ==========================================================================
   SMU Buy Now Button — Frontend Styles
   Version: 1.0.3
   Author:  SiteMeUp (https://sitemeup.co.za)

   NOTE: No colours or font sizes are set here by default — the button
   inherits theme styles via the .button class. Custom styles set in
   WooCommerce > Buy Now Button settings are applied via inline style
   attributes and a <style> block in <head>, overriding these rules.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buy Now button wrapper
   -------------------------------------------------------------------------- */
.smu-buy-now-wrap {
	margin-top: 1em;
}

/* The button itself uses only layout/cursor defaults.
   Colour, font, padding and border-radius intentionally omitted —
   they come from the theme's .button class or the plugin settings. */
.smu-buy-now-btn {
	display: inline-block;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
	text-decoration: none;
}

.smu-buy-now-btn:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.smu-buy-now-btn:active {
	transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   Overlay / backdrop
   -------------------------------------------------------------------------- */
.smu-buy-now-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: smuFadeIn 0.2s ease;
}

.smu-buy-now-overlay[hidden] {
	display: none;
}

body.smu-modal-open {
	overflow: hidden;
}

@keyframes smuFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Modal card
   -------------------------------------------------------------------------- */
.smu-buy-now-modal {
	background: #fff;
	border-radius: 6px;
	padding: 2rem 2.25rem;
	max-width: 480px;
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: smuSlideUp 0.22s ease;
	position: relative;
}

@keyframes smuSlideUp {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

.smu-buy-now-modal h2 {
	margin: 0 0 0.6em;
	font-size: 1.25em;
	line-height: 1.3;
	color: #1d2327;
}

.smu-buy-now-modal p {
	margin: 0 0 1.25em;
	color: #50575e;
	font-size: 0.95em;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Progress bar (auto-redirect countdown)
   -------------------------------------------------------------------------- */
.smu-buy-now-progress-wrap {
	height: 4px;
	background: #e0e0e0;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 1.5em;
}

.smu-buy-now-progress-bar {
	height: 100%;
	width: 0%;
	background: currentColor;
	opacity: 0.5;
	border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Modal action buttons
   -------------------------------------------------------------------------- */
.smu-buy-now-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.smu-buy-now-continue {
	font-size: 0.9em !important;
	font-weight: 600 !important;
	cursor: pointer;
	text-decoration: none !important;
}

.smu-buy-now-cancel {
	background: transparent !important;
	color: #50575e !important;
	border: 1px solid #c3c4c7 !important;
	padding: 0.7em 1.4em !important;
	font-size: 0.9em !important;
	border-radius: 3px !important;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.smu-buy-now-cancel:hover,
.smu-buy-now-cancel:focus {
	color: #1d2327 !important;
	border-color: #8c8f94 !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
	.smu-buy-now-modal {
		padding: 1.5rem 1.25rem;
	}

	.smu-buy-now-actions {
		flex-direction: column;
	}

	.smu-buy-now-continue,
	.smu-buy-now-cancel {
		width: 100%;
		text-align: center;
	}
}
