/* Visualizer Sign In / Sign Up modal. Field, promo and link styles come from the account page's .login-right rules. */
.bwo-auth-modal { position: fixed; inset: 0; z-index: 2147483647; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bwo-auth-modal[hidden] { display: none !important; }
.bwo-auth-modal__backdrop { position: absolute; inset: 0; background: rgba(17, 25, 34, .6); }

.bwo-auth-modal__dialog.login-right {
	position: relative;
	flex: 0 1 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	margin: 0;
	padding: 40px 48px 32px;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

html.bwo-auth-open { overflow: hidden; }

.bwo-auth-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none !important;
	color: #6b7280;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
/* The theme's button hover turns text white, which hid the X on the white dialog. */
.bwo-auth-modal__close:hover,
.bwo-auth-modal__close:focus { color: #111827 !important; }

.bwo-auth-modal .login-right h2,
.bwo-auth-modal__dialog h2 { font-size: 34px; font-weight: 500; margin: 0 0 16px; }

.bwo-auth-modal .woocommerce-form { max-width: none !important; }
.bwo-auth-modal .woocommerce-form .form-row { margin: 0 0 14px; padding: 0; }
.bwo-auth-modal .woocommerce-form label { display: block; margin-bottom: 6px; }
.bwo-auth-modal .woocommerce-form .woocommerce-Input { width: 100%; padding: 0 40px 0 18px; }

/* Primary button: full-width red pill (the account page gets this from its .woocommerce wrapper). */
.bwo-auth-modal .woocommerce-form button[type="submit"] {
	display: block !important;
	width: 100%;
	max-width: 400px;
	margin: 18px auto 0;
	padding: 12px 24px !important;
	border: 0;
	border-radius: 999px;
	background: #d01010 !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 500 !important;
	justify-content: center;
}

.bwo-auth-modal .woocommerce-LostPassword { margin: -4px 0 0 !important; }
.bwo-auth-modal .register-link { margin-top: 16px !important; }

.bwo-auth-modal div.nsl-container .nsl-container-buttons { justify-content: center; }

.bwo-auth-modal__notices .woocommerce-error,
.bwo-auth-modal__notices .woocommerce-message,
.bwo-auth-modal__notices .woocommerce-info {
	margin: 0 0 16px;
	padding: 10px 14px !important;
	list-style: none;
	background: #fff2f2;
	border: 0;
	border-radius: 8px;
	color: #a60000;
	font-size: 14px;
}

.bwo-auth-modal__notices .woocommerce-error::before,
.bwo-auth-modal__notices .woocommerce-message::before,
.bwo-auth-modal__notices .woocommerce-info::before { content: none; }

@media (max-width: 600px) {
	.bwo-auth-modal__dialog.login-right { padding: 32px 20px 24px; border-radius: 18px; }
	.bwo-auth-modal__dialog h2 { font-size: 28px; }
}

/* Shown while the sign-in / sign-up post reloads the page. */
.bwo-auth-modal__busy { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(255, 255, 255, .92); color: #111922; font-size: 18px; font-weight: 500; }
.bwo-auth-modal__busy[hidden] { display: none !important; }
.bwo-auth-modal__spinner { width: 40px; height: 40px; border: 4px solid #f3d0d0; border-top-color: #d01010; border-radius: 50%; animation: bwo-auth-spin .8s linear infinite; }
@keyframes bwo-auth-spin { to { transform: rotate(360deg); } }


/* Short screens: tighten the dialog so Sign In / Sign Up fit without an inner scrollbar
   (the dialog's overflow stays only as a fallback for very small heights). */
@media (max-height: 900px) {
	.bwo-auth-modal__dialog.login-right { padding: 26px 40px 22px; }
	.bwo-auth-modal .login-right h2,
	.bwo-auth-modal__dialog h2 { font-size: 28px; margin-bottom: 10px; }
	.bwo-auth-modal .member-unlock-msg { margin-bottom: 14px; font-size: 15px; }
	.bwo-auth-modal .woocommerce-form .form-row { margin-bottom: 10px; }
	.bwo-auth-modal .woocommerce-form label { margin-bottom: 4px; }
	.bwo-auth-modal .woocommerce-form button[type="submit"] { margin-top: 12px; padding: 10px 24px !important; }
	.bwo-auth-modal .register-link { margin-top: 10px !important; }
	.bwo-auth-modal .woocommerce-privacy-policy-text p { margin: 0 0 4px; font-size: 12px; line-height: 1.45; }
}
@media (max-height: 740px) {
	.bwo-auth-modal__dialog.login-right { padding: 20px 32px 16px; }
	.bwo-auth-modal .login-right h2,
	.bwo-auth-modal__dialog h2 { font-size: 24px; margin-bottom: 8px; }
	.bwo-auth-modal .member-unlock-msg { margin-bottom: 10px; font-size: 14px; }
	.bwo-auth-modal .woocommerce-form .form-row { margin-bottom: 8px; }
	.bwo-auth-modal .woocommerce-form .woocommerce-Input { height: 36px !important; }
}
/* Phones: less side padding so fields keep their width. */
@media (max-width: 575px) {
	.bwo-auth-modal { padding: 10px; }
	.bwo-auth-modal__dialog.login-right { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding-left: 18px; padding-right: 18px; }
}

/* Google / Apple side by side (one row instead of two). */
.bwo-auth-modal div.nsl-container .nsl-container-buttons { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.bwo-auth-modal div.nsl-container .nsl-container-buttons a { min-width: 0; width: auto; margin: 0 !important; }
/* Half-width button: the plugin's 16px label with 12px/24px side margins was clipped. Keep its
   own vertical padding (it centres the text against the icon); only shrink the type and margins. */
.bwo-auth-modal div.nsl-container .nsl-button-default div.nsl-button-label-container { margin: 0 10px 0 6px; font-size: 14px; white-space: nowrap; }
/* Below 640px the dialog is too narrow for two full labels: stack them. */
@media (max-width: 640px) {
	.bwo-auth-modal div.nsl-container .nsl-container-buttons { grid-template-columns: 1fr; }
}
