/* Mobile Signup/Login Styles */

.msl-signup-container {
	max-width: 500px;
	margin: 40px auto;
	padding: 30px 20px;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	position: relative;
	z-index: 9999;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Hide default WooCommerce login form when our form is shown */
body.woocommerce-account:not(.logged-in) .woocommerce-customer-login,
body.woocommerce-account:not(.logged-in) .woocommerce-customer-register,
body.woocommerce-account:not(.logged-in) .em-row.woocommerce-customer-login {
	display: none !important;
}

.msl-title {
	text-align: center;
	font-size: 28px;
	font-weight: 600;
	margin: 0 0 30px 0;
	color: #000000;
}

/* Phone Input Section */
.msl-phone-section {
	margin-bottom: 30px;
}

.msl-phone-input-wrapper {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.msl-country-code-wrapper {
	flex: 0 0 auto;
	position: relative;
}

.msl-country-code {
	width: 120px;
	padding: 12px 35px 12px 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 16px;
	background: #ffffff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.msl-country-code:focus {
	outline: none;
	border-color: #000;
}

/* Phone number wrapper for spinner arrows */
.msl-phone-number-wrapper {
	position: relative;
	flex: 1;
}

.msl-phone-number {
	width: 100%;
	padding: 12px 40px 12px 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 16px;
}

.msl-phone-number:focus {
	outline: none;
	border-color: #000;
}

/* Spinner arrows for phone number input */
.msl-phone-number-wrapper::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 8px;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #666;
	pointer-events: none;
	z-index: 1;
}

.msl-phone-number-wrapper::before {
	content: '';
	position: absolute;
	right: 12px;
	bottom: 8px;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 5px solid #666;
	pointer-events: none;
	z-index: 1;
}

.msl-get-otp-btn {
	width: 100%;
	padding: 14px 20px;
	background: #000000;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease;
}

.msl-get-otp-btn:hover {
	background: #333333;
}

.msl-get-otp-btn:disabled {
	background: #999999;
	cursor: not-allowed;
}

.msl-get-otp-btn.msl-timer-active {
	background: #666666;
}

/* Phone Error Message */
.msl-phone-error {
	color: #dc3232 !important;
	font-size: 14px;
	margin-top: 8px;
	margin-bottom: 12px;
	padding: 0;
	line-height: 1.4;
	display: none;
	min-height: 20px;
	visibility: visible;
	opacity: 1;
	width: 100%;
	text-align: left;
	font-weight: normal;
}

.msl-phone-error.msl-error-visible {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.msl-phone-error:before {
	content: "⚠ ";
	margin-right: 4px;
	font-weight: bold;
	color: #dc3232;
}

.msl-phone-error:empty {
	display: none !important;
}

/* Show error when it has content OR when class is added */
.msl-phone-error:not(:empty),
.msl-phone-error.msl-error-visible {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* OTP Section */
.msl-otp-section {
	margin-bottom: 30px;
	text-align: center;
}

.msl-otp-input {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 18px;
	text-align: center;
	letter-spacing: 8px;
	margin-bottom: 15px;
}

.msl-otp-input:focus {
	outline: none;
	border-color: #000;
}

.msl-verify-otp-btn {
	width: 100%;
	padding: 14px 20px;
	background: #000000;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 10px;
	transition: background 0.3s ease;
}

.msl-verify-otp-btn:hover {
	background: #333333;
}

.msl-verify-otp-btn:disabled {
	background: #999999;
	cursor: not-allowed;
}

.msl-resend-otp-btn {
	width: 100%;
	padding: 10px 20px;
	background: transparent;
	color: #000000;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.msl-resend-otp-btn:hover:not(:disabled) {
	background: #f5f5f5;
	border-color: #000;
}

.msl-resend-otp-btn:disabled,
.msl-resend-otp-btn.msl-timer-active {
	background: #f5f5f5;
	color: #999999;
	border-color: #ddd;
	cursor: not-allowed;
}

/* Social Login Section */
.msl-social-section {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
}

.msl-facebook-btn,
.msl-google-btn {
	flex: 1;
	padding: 14px 20px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: opacity 0.3s ease;
}

.msl-facebook-btn:hover,
.msl-google-btn:hover {
	opacity: 0.9;
}

.msl-facebook-btn {
	background: #1877F2;
	color: #ffffff;
}

.msl-google-btn {
	background: #DB4437;
	color: #ffffff;
}

.msl-btn-text {
	flex: 1;
	text-align: center;
}

.msl-facebook-icon,
.msl-google-icon {
	flex-shrink: 0;
}

/* Privacy Text */
.msl-privacy-text {
	text-align: center;
	font-size: 12px;
	color: #000000;
	margin: 0;
	line-height: 1.5;
}

.msl-privacy-link {
	color: #1877F2;
	text-decoration: underline;
}

.msl-privacy-link:hover {
	text-decoration: none;
}

/* Message Display */
.msl-message {
	padding: 12px 15px;
	border-radius: 8px;
	margin-top: 20px;
	font-size: 14px;
	text-align: center;
}

.msl-message.msl-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.msl-message.msl-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Already Logged In */
.msl-already-logged-in {
	text-align: center;
	padding: 20px;
	background: #f0f0f1;
	border-radius: 8px;
	margin: 40px auto;
	max-width: 500px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.msl-signup-container {
		margin: 20px auto;
		padding: 20px 15px;
	}
	
	.msl-title {
		font-size: 24px;
		margin-bottom: 25px;
	}
	
	.msl-phone-input-wrapper {
		flex-direction: column;
		gap: 15px;
	}
	
	.msl-country-code {
		width: 100%;
	}
	
	.msl-social-section {
		flex-direction: column;
		gap: 12px;
	}
	
	.msl-facebook-btn,
	.msl-google-btn {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.msl-title {
		font-size: 22px;
	}
	
	.msl-get-otp-btn,
	.msl-verify-otp-btn,
	.msl-facebook-btn,
	.msl-google-btn {
		padding: 12px 15px;
		font-size: 15px;
	}
	
	.msl-privacy-text {
		font-size: 11px;
	}
}

