/* MG Floral Product Access Control - Styles */

/* Login Popup Overlay */
.mgfloral-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	backdrop-filter: blur(2px);
}

.mgfloral-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Login Popup Content */
.mgfloral-popup-content {
	background: #ffffff;
	padding: 0;
	border-radius: 12px;
	max-width: 900px;
	width: 90%;
	max-height: 90vh;
	position: relative;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	transform: scale(0.95);
	transition: transform 0.3s ease;
	border: 1px solid rgba(255, 182, 193, 0.2);
	overflow: hidden;
	display: flex;
}

.mgfloral-popup-overlay.active .mgfloral-popup-content {
	transform: scale(1);
}

/* Popup Wrapper for two-column layout */
.mgfloral-popup-wrapper {
	display: flex;
	width: 100%;
	min-height: 500px;
}

/* Image Section (Left Side) */
.mgfloral-popup-image {
	flex: 0 0 45%;
	background: #f8f8f8;
	position: relative;
	overflow: hidden;
}

.mgfloral-popup-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Form Section (Right Side) */
.mgfloral-popup-form-section {
	flex: 1;
	padding: 45px 40px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	overflow-y: auto;
	max-height: 90vh;
}

.mgfloral-popup-content h2 {
	margin-top: 0;
	margin-bottom: 12px;
	color: #333333;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.5px;
}

.mgfloral-popup-content p {
	margin-bottom: 25px;
	color: #666666;
	line-height: 1.6;
	font-size: 15px;
}

/* Tabs */
.mgfloral-popup-tabs {
	display: flex;
	border-bottom: 2px solid #e0e0e0;
	margin-bottom: 25px;
}

.mgfloral-tab-btn {
	flex: 1;
	padding: 12px 20px;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	color: #666;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mgfloral-tab-btn:hover {
	color: #ff6b35;
	background-color: #fafafa;
}

.mgfloral-tab-btn.active {
	color: #ff6b35;
	border-bottom-color: #ff6b35;
	background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 138, 171, 0.1) 100%);
}

/* Tab Content */
.mgfloral-tab-content {
	display: none;
}

.mgfloral-tab-content.active {
	display: block;
}

/* Form Rows */
.form-row {
	margin-bottom: 20px;
}

.form-row-first,
.form-row-last {
	display: inline-block;
	width: 48%;
	vertical-align: top;
}

.form-row-first {
	margin-right: 4%;
}

.form-row-wide {
	width: 100%;
}

.form-row label .required {
	color: #ff6b35;
}

/* Close Button */
.mgfloral-popup-close {
	position: absolute;
	top: 18px;
	right: 20px;
	font-size: 26px;
	font-weight: 300;
	color: #999999;
	cursor: pointer;
	line-height: 1;
	transition: color 0.3s ease;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.mgfloral-popup-close:hover {
	color: #ff6b9d;
	background-color: rgba(255, 107, 157, 0.1);
}

/* Login Form */
#mgfloral-login-form p {
	margin-bottom: 18px;
}

#mgfloral-login-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333333;
	font-size: 14px;
}

#mgfloral-login-form input[type="text"],
#mgfloral-login-form input[type="password"] {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	font-size: 15px;
	box-sizing: border-box;
	background-color: #ffffff;
	color: #333333;
	transition: all 0.3s ease;
}

#mgfloral-login-form input[type="text"]:focus,
#mgfloral-login-form input[type="password"]:focus,
#mgfloral-register-form input[type="text"]:focus,
#mgfloral-register-form input[type="email"]:focus,
#mgfloral-register-form input[type="password"]:focus {
	outline: none;
	border-color: #ffb6c1;
	box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.1);
}

#mgfloral-register-form input[type="text"],
#mgfloral-register-form input[type="email"],
#mgfloral-register-form input[type="password"] {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	font-size: 15px;
	box-sizing: border-box;
	background-color: #ffffff;
	color: #333333;
	transition: all 0.3s ease;
}

#mgfloral-register-form small {
	display: block;
	margin-top: 5px;
	color: #666;
	font-size: 12px;
}

#mgfloral-login-form input[type="text"]::placeholder,
#mgfloral-login-form input[type="password"]::placeholder {
	color: #999999;
}

#mgfloral-login-form input[type="checkbox"] {
	margin-right: 8px;
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #ffb6c1;
}

#mgfloral-login-form label[for="mgfloral-rememberme"],
#mgfloral-login-form label:has(input[type="checkbox"]) {
	display: flex;
	align-items: center;
	font-weight: 400;
	font-size: 14px;
	color: #666666;
	margin-bottom: 0;
}

#mgfloral-login-form button,
#mgfloral-register-form button,
.mgfloral-register-btn {
	width: 100%;
	padding: 14px 24px;
	background: linear-gradient(135deg, #ff6b35 0%, #ff8fab 100%);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
	text-transform: uppercase;
	letter-spacing: 1px;
}

#mgfloral-login-form button:hover,
#mgfloral-register-form button:hover,
.mgfloral-register-btn:hover {
	background: linear-gradient(135deg, #e55a2b 0%, #ff7a9b 100%);
	box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
	transform: translateY(-1px);
}

#mgfloral-login-form button:active,
#mgfloral-register-form button:active,
.mgfloral-register-btn:active {
	transform: translateY(0);
}

#mgfloral-login-form button:disabled,
#mgfloral-register-form button:disabled,
.mgfloral-register-btn:disabled {
	background: #cccccc;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.mgfloral-login-error {
	margin-top: 12px;
	margin-bottom: 0;
	padding: 12px 16px;
	background-color: #fff5f5;
	border-left: 4px solid #ff6b9d;
	border-radius: 6px;
	color: #d63384;
	font-size: 14px;
}

.mgfloral-login-success {
	margin-top: 12px;
	margin-bottom: 0;
	padding: 12px 16px;
	background: #d4edda;
	border-left: 4px solid #28a745;
	border-radius: 6px;
	color: #0d4f1c;
	font-size: 14px;
	font-weight: 600;
}

/* Background Loader */
.mgfloral-page-loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.9);
	z-index: 999998;
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.mgfloral-page-loader.active {
	display: flex;
}

.mgfloral-loader-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #ff6b35;
	border-radius: 50%;
	animation: mgfloral-spin 1s linear infinite;
	margin-bottom: 15px;
}

.mgfloral-loader-text {
	color: #333;
	font-size: 16px;
	font-weight: 500;
}

@keyframes mgfloral-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Login Required Message */
.mgfloral-login-required {
	margin: 20px 0;
	text-align: center;
}

.mgfloral-login-message {
	background: linear-gradient(135deg, rgba(255, 182, 193, 0.1) 0%, rgba(255, 143, 171, 0.1) 100%);
	border: 1px solid rgba(255, 182, 193, 0.3);
	border-radius: 8px;
	padding: 20px 24px;
	margin: 20px 0;
	color: #666666;
	text-align: center;
}

.mgfloral-login-message p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

/* Button Styles */
.mgfloral-login-trigger {
	display: inline-block;
	padding: 12px 24px;
	background: linear-gradient(135deg, #ffb6c1 0%, #ff8fab 100%);
	color: #ffffff !important;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.3s ease;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
	border: none;
	font-size: 15px;
}

.mgfloral-login-trigger:hover {
	background: linear-gradient(135deg, #ff8fab 0%, #ff6b9d 100%);
	color: #ffffff !important;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(255, 182, 193, 0.4);
	transform: translateY(-1px);
}

.mgfloral-login-trigger:active {
	transform: translateY(0);
}

/* Hide product content for non-logged-in users on single product pages */
body.mgfloral-login-required-page .woocommerce-product-gallery,
body.mgfloral-login-required-page .product_meta,
body.mgfloral-login-required-page .woocommerce-product-details__short-description,
body.mgfloral-login-required-page .product_title,
body.mgfloral-login-required-page .woocommerce-tabs {
	display: none !important;
}

/* Hide login button and message for logged-in users */
body.logged-in .mgfloral-login-required,
body.logged-in .mgfloral-login-message {
	display: none !important;
}

/* Show login message prominently on product pages */
body.mgfloral-login-required-page .mgfloral-login-message {
	margin: 40px 0;
	padding: 30px;
	font-size: 18px;
	text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
	.mgfloral-popup-wrapper {
		flex-direction: column;
		min-height: auto;
	}
	
	.mgfloral-popup-image {
		flex: 0 0 200px;
		max-height: 200px;
	}
	
	.mgfloral-popup-form-section {
		padding: 30px 20px;
	}
	
	.mgfloral-popup-content {
		max-width: 95%;
	}
	
	.mgfloral-popup-content h2 {
		font-size: 20px;
	}
}

/* Pack Size Radio Buttons Styling - REMOVED as per client requirement */

/* Vendor Name Display */
.mgfloral-vendor-name {
	margin-top: 10px;
	margin-bottom: 15px;
	font-size: 14px;
	color: #666;
}

/* Checkout Details Styling */
.mgfloral-checkout-details th {
	padding: 15px 0 10px;
	border-top: 1px solid #e0e0e0;
	font-weight: 600;
	color: #333;
}

.mgfloral-checkout-details td {
	padding: 8px 0;
	font-size: 13px;
	color: #666;
}

