/**
 * Frontend Layout Stylesheet for Woo Button.
 * Handles the custom inquiry button position margins, modal backdrop, glassmorphism, transitions, and responsiveness.
 */

/* Container wrapping the custom button */
.woo-custom-button-container {
	margin: 20px 0;
	display: block;
	clear: both;
}

/* Base custom button styling is injected inline dynamically, but we add layout overrides here */
.woo-custom-button {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	outline: none;
}

.woo-custom-button:hover,
.woo-custom-button:focus {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	transform: translateY(-1px);
}

.woo-custom-button:active {
	transform: translateY(1px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modal Popup Backdrop Overlay */
.woo-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(15, 23, 42, 0.6); /* Modern slate tinted overlay */
	backdrop-filter: blur(8px); /* Premium glassmorphism effect */
	-webkit-backdrop-filter: blur(8px);
	z-index: 999999;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	padding: 20px;
	box-sizing: border-box;
}

/* Display modal when active class is triggered */
.woo-modal-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

/* Modal Box Container */
.woo-modal-container {
	background: #ffffff;
	border-radius: 16px;
	padding: 40px 32px 32px 32px;
	width: 100%;
	max-width: 500px;
	max-height: 90vh;
	overflow-y: auto;
	box-sizing: border-box;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
	position: relative;
	transform: scale(0.92) translateY(20px);
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modal animation when opened */
.woo-modal-overlay.active .woo-modal-container {
	transform: scale(1) translateY(0);
}

/* Modal Close Button */
.woo-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: transparent;
	border: none;
	color: #64748b;
	cursor: pointer;
	padding: 6px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease-in-out;
	outline: none;
	width: 32px;
	height: 32px;
	box-shadow: none !important;
}

.woo-modal-close:hover {
	background: #f1f5f9;
	color: #0f172a;
	transform: rotate(90deg);
}

.woo-modal-close svg {
	width: 20px;
	height: 20px;
}

/* Modal Form styling overrides (makes standard forms look premium) */
.woo-modal-content {
	font-family: inherit;
	color: #334155;
	font-size: 14px;
	line-height: 1.6;
}

.woo-modal-content form label {
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
	display: block;
}

.woo-modal-content input[type="text"],
.woo-modal-content input[type="email"],
.woo-modal-content input[type="tel"],
.woo-modal-content textarea,
.woo-modal-content select {
	width: 100%;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 10px 12px;
	color: #334155;
	box-sizing: border-box;
	font-size: 14px;
	margin-bottom: 16px;
	transition: all 0.2s ease;
	outline: none;
}

.woo-modal-content input:focus,
.woo-modal-content textarea:focus,
.woo-modal-content select:focus {
	border-color: #7f54b3;
	box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.15);
	background: #ffffff;
}

.woo-modal-content input[type="submit"],
.woo-modal-content button[type="submit"] {
	background: #7f54b3;
	color: #ffffff;
	border: none;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 700;
	border-radius: 6px;
	cursor: pointer;
	width: 100%;
	transition: all 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(127, 84, 179, 0.15);
}

.woo-modal-content input[type="submit"]:hover,
.woo-modal-content button[type="submit"]:hover {
	background: #6a439c;
	box-shadow: 0 6px 12px rgba(127, 84, 179, 0.25);
}

/* Hide background scroll when modal is open */
body.woo-modal-open {
	overflow: hidden !important;
	position: relative;
	/* Add width compensation for scrollbar to prevent layout shift */
	width: calc(100% - var(--scrollbar-width, 0px));
}
