/*
 * WooCommerce Book Now Login Popup — styles.
 * Every class is prefixed `wcbnlp-`. No global selectors are touched.
 */

.wcbnlp-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, var( --wcbnlp-overlay-opacity, 0.6 ) );
	padding: 16px;
}

.wcbnlp-overlay[hidden] {
	display: none;
}

.wcbnlp-widget {
	--wcbnlp-primary: #1a73e8;
	--wcbnlp-border: #d7dbe0;
	--wcbnlp-text: #1f2328;
	--wcbnlp-muted: #6b7280;
	--wcbnlp-danger: #d93025;
	--wcbnlp-success: #1e8e3e;
}

.wcbnlp-modal {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: var( --wcbnlp-width, 450px );
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: var( --wcbnlp-radius, 12px );
	padding: 32px 28px 28px;
	color: var( --wcbnlp-text );
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.25 );
}

.wcbnlp-widget--inline {
	max-width: 480px;
	color: var( --wcbnlp-text );
	font-size: 14px;
	line-height: 1.5;
}

.wcbnlp-modal *,
.wcbnlp-widget--inline * {
	box-sizing: border-box;
}

.wcbnlp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 44px;
	height: 44px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var( --wcbnlp-muted );
	cursor: pointer;
	border-radius: 50%;
}

.wcbnlp-close:hover {
	background: #f1f3f4;
}

.wcbnlp-heading {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	text-align: center;
}

.wcbnlp-subheading {
	margin: 0 0 20px;
	text-align: center;
	color: var( --wcbnlp-muted );
	font-size: 13px;
}

.wcbnlp-tabs {
	display: flex;
	gap: 20px;
	justify-content: center;
	margin-bottom: 20px;
	border-bottom: 1px solid var( --wcbnlp-border );
}

.wcbnlp-tab:focus-visible,
.wcbnlp-button:focus-visible,
.wcbnlp-link-button:focus-visible,
.wcbnlp-close:focus-visible {
	outline: 2px solid var( --wcbnlp-primary );
	outline-offset: 2px;
}

.wcbnlp-tab {
	background: none;
	border: none;
	padding: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: var( --wcbnlp-muted );
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.wcbnlp-tab--active {
	color: var( --wcbnlp-primary );
	border-bottom-color: var( --wcbnlp-primary );
}

.wcbnlp-panel[hidden] {
	display: none;
}

.wcbnlp-field-label {
	display: block;
	margin: 14px 0 4px;
	font-size: 13px;
	color: var( --wcbnlp-muted );
}

.wcbnlp-input {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var( --wcbnlp-border );
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
	color: var( --wcbnlp-text );
}

.wcbnlp-input:focus {
	outline: none;
	border-color: var( --wcbnlp-primary );
	box-shadow: 0 0 0 3px rgba( 26, 115, 232, 0.15 );
}

.wcbnlp-name-row {
	display: flex;
	gap: 10px;
}

.wcbnlp-name-col {
	flex: 1 1 0;
	min-width: 0;
}

.wcbnlp-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 4px;
	font-size: 13px;
	color: var( --wcbnlp-muted );
	min-height: 44px;
}

.wcbnlp-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: 14px;
	padding: 10px 16px;
	border: 1px solid var( --wcbnlp-border );
	border-radius: 8px;
	background: #fff;
	color: var( --wcbnlp-text );
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.wcbnlp-button[hidden] {
	display: none;
}

.wcbnlp-button--primary {
	background: var( --wcbnlp-primary );
	border-color: var( --wcbnlp-primary );
	color: #fff;
}

.wcbnlp-button--primary:hover {
	filter: brightness( 0.95 );
}

.wcbnlp-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wcbnlp-link-button {
	display: block;
	width: 100%;
	min-height: 44px;
	margin-top: 6px;
	background: none;
	border: none;
	color: var( --wcbnlp-primary );
	font-size: 13px;
	cursor: pointer;
	text-align: center;
	text-decoration: underline;
}

.wcbnlp-switch-line {
	margin: 10px 0 0;
	text-align: center;
	font-size: 13px;
	color: var( --wcbnlp-muted );
}

.wcbnlp-switch-line .wcbnlp-link-button {
	display: inline;
	width: auto;
	min-height: auto;
	margin: 0 0 0 4px;
}

.wcbnlp-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 18px 0 14px;
	color: var( --wcbnlp-muted );
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wcbnlp-divider::before,
.wcbnlp-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var( --wcbnlp-border );
}

.wcbnlp-social-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.wcbnlp-social-row[hidden] {
	display: none;
}

.wcbnlp-social-row .wcbnlp-button,
.wcbnlp-social-row .wcbnlp-google-button-slot {
	width: 100%;
}

.wcbnlp-social-row .wcbnlp-button {
	margin-top: 0;
	border-radius: 999px;
}

.wcbnlp-google-button-slot {
	display: flex;
	justify-content: center;
	min-height: 40px;
}

.wcbnlp-social-icon {
	display: inline-flex;
	margin-right: 8px;
}

/* Phone / OTP fields */

.wcbnlp-required {
	color: var( --wcbnlp-danger );
}

.wcbnlp-mobile-panel {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var( --wcbnlp-border );
}

.wcbnlp-mobile-back {
	display: inline-block;
	margin-bottom: 10px;
}

.wcbnlp-phone-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.wcbnlp-country-select {
	flex: 0 0 108px;
	min-width: 0;
	min-height: 44px;
	padding: 8px 6px;
	border: 1px solid var( --wcbnlp-border );
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wcbnlp-phone-field {
	flex: 1 1 auto;
	min-width: 0;
}

/* The Send OTP button sits inline with the select + input above, so
   it must not inherit .wcbnlp-button's default top margin (meant for
   buttons that stack vertically below a field) — that extra margin
   is what was pushing it visibly lower than its siblings. It should
   also size to its own label rather than stretching via flex. */
.wcbnlp-phone-row .wcbnlp-button {
	flex: 0 0 auto;
	width: auto;
	margin-top: 0;
	white-space: nowrap;
	padding-left: 14px;
	padding-right: 14px;
}

.wcbnlp-otp-field {
	letter-spacing: 0.4em;
	text-align: center;
	font-size: 18px;
}

.wcbnlp-otp-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.wcbnlp-otp-actions .wcbnlp-button {
	margin-top: 12px;
	flex: 1 1 auto;
}

.wcbnlp-phone-verified-note {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var( --wcbnlp-success );
}

.wcbnlp-recaptcha-container:empty {
	display: none;
}

.wcbnlp-error {
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fdecea;
	color: var( --wcbnlp-danger );
	font-size: 13px;
}

.wcbnlp-success {
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #e6f4ea;
	color: var( --wcbnlp-success );
	font-size: 13px;
}

.wcbnlp-loading {
	display: flex;
	justify-content: center;
	padding: 14px 0 0;
}

.wcbnlp-loading[hidden] {
	display: none;
}

.wcbnlp-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid var( --wcbnlp-border );
	border-top-color: var( --wcbnlp-primary );
	border-radius: 50%;
	animation: wcbnlp-spin 0.7s linear infinite;
}

@keyframes wcbnlp-spin {
	to {
		transform: rotate( 360deg );
	}
}

/* Mobile: near-full-width modal, no horizontal scroll. */
@media ( max-width: 480px ) {
	.wcbnlp-modal {
		max-width: 94vw;
		padding: 28px 18px 20px;
	}
}
