/* VCL Auth Modal: login / register popup attached to the Astra account icon. */
.vcl-auth-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, visibility 0s linear .2s;
}

.vcl-auth-modal.is-active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transition: opacity .2s ease;
}

body.vcl-auth-modal-open {
	overflow: hidden;
}

.vcl-auth-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* Dialog: form on the left, square slider on the right (desktop). */
.vcl-auth-modal-dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	width: 100%;
	max-width: 880px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #ffffff;
	color: #111111;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	transform: translateY(12px);
	transition: transform .2s ease;
}

.vcl-auth-modal.is-active .vcl-auth-modal-dialog {
	transform: translateY(0);
}

.vcl-auth-pane {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 540px;
	padding: 16px 20px 14px;
}

.vcl-auth-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 12px;
}

.vcl-auth-back,
.vcl-auth-langswitch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 8px;
	font-size: 12px;
	line-height: 1;
	color: #111111;
	background: transparent;
	border: 0;
	border-radius: 4px;
	text-decoration: none;
	cursor: pointer;
}

.vcl-auth-back {
	border: 1px solid #111111;
}

.vcl-auth-back:hover,
.vcl-auth-back:focus-visible,
.vcl-auth-langswitch:hover,
.vcl-auth-langswitch:focus-visible {
	background: #f0f0f0;
	color: #111111;
}

.vcl-auth-flag {
	display: inline-block;
	width: 22px;
	height: 15px;
	border-radius: 2px;
	background-size: cover;
	background-position: center;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.vcl-auth-flag-vn {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23da251d'/%3E%3Cpath fill='%23ff0' d='M15 4l1.8 5.5h5.8l-4.7 3.4 1.8 5.5-4.7-3.4-4.7 3.4 1.8-5.5-4.7-3.4h5.8z'/%3E%3C/svg%3E");
}

.vcl-auth-flag-gb {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23012169'/%3E%3Cpath d='M0 0l60 40M60 0L0 40' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M0 0l60 40M60 0L0 40' stroke='%23c8102e' stroke-width='3'/%3E%3Cpath d='M30 0v40M0 20h60' stroke='%23fff' stroke-width='13'/%3E%3Cpath d='M30 0v40M0 20h60' stroke='%23c8102e' stroke-width='8'/%3E%3C/svg%3E");
}

.vcl-auth-modal-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	max-width: 320px;
	margin: 0 auto;
	padding: 8px 0 12px;
}

.vcl-auth-logo {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 8px;
	object-fit: contain;
}

.vcl-auth-title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	text-align: center;
	color: #000000;
}

.vcl-auth-title-register {
	margin-bottom: 20px;
	font-size: 22px;
}

.vcl-auth-subtitle {
	margin: 0 0 14px;
	font-size: 12px;
	text-align: center;
	color: #666666;
}

.vcl-auth-google-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 40px;
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	background: #1b1b1b;
	border-radius: 4px;
	text-decoration: none;
}

.vcl-auth-google-btn:hover,
.vcl-auth-google-btn:focus-visible {
	background: #000000;
	color: #ffffff;
}

.vcl-auth-google-btn svg {
	flex: 0 0 auto;
	padding: 2px;
	background: #ffffff;
	border-radius: 50%;
}

.vcl-auth-or {
	margin: 10px 0;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.vcl-auth-notice {
	margin: 0 0 14px;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.5;
	border-left: 3px solid #c0392b;
	background: #fdf0ee;
	color: #7b241c;
}

.vcl-auth-notice.is-success {
	border-left-color: #1e8449;
	background: #eafaf1;
	color: #145a32;
}

.vcl-auth-field {
	margin: 0 0 14px;
}

.vcl-auth-field label {
	display: block;
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 600;
	color: #222222;
}

.vcl-auth-field .required {
	color: #c0392b;
}

.vcl-auth-input {
	display: block;
	width: 100%;
	height: 38px;
	padding: 0 10px;
	font-size: 14px;
	color: #111111;
	background: #ffffff;
	border: 1px solid #cfcfcf;
	border-radius: 3px;
	box-sizing: border-box;
}

.vcl-auth-input:focus {
	outline: none;
	border-color: #000000;
	box-shadow: 0 0 0 1px #000000;
}

.vcl-auth-input.is-invalid {
	border-color: #c0392b;
}

.vcl-auth-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
	font-size: 12px;
}

.vcl-auth-remember {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.vcl-auth-remember input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.vcl-auth-toggle {
	position: relative;
	flex: 0 0 auto;
	width: 28px;
	height: 16px;
	background: #bbbbbb;
	border-radius: 8px;
	transition: background .15s ease;
}

.vcl-auth-toggle::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform .15s ease;
}

.vcl-auth-remember input:checked + .vcl-auth-toggle {
	background: #111111;
}

.vcl-auth-remember input:checked + .vcl-auth-toggle::after {
	transform: translateX(12px);
}

.vcl-auth-remember input:focus-visible + .vcl-auth-toggle {
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.vcl-auth-lostpass,
.vcl-auth-switch-link {
	color: #000000;
	font-weight: 600;
	text-decoration: underline;
}

.vcl-auth-submit-btn {
	position: relative;
	display: block;
	width: 100%;
	height: 42px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	color: #ffffff;
	background-color: #1b1b1b;
	border: 1px solid #1b1b1b;
	border-radius: 3px;
	cursor: pointer;
}

.vcl-auth-submit-btn:hover,
.vcl-auth-submit-btn:focus-visible {
	background-color: #000000;
}

.vcl-auth-submit-btn[disabled] {
	opacity: .7;
	cursor: progress;
}

.vcl-auth-spinner {
	display: none;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	vertical-align: -3px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: vcl-auth-spin .7s linear infinite;
}

.vcl-auth-submit-btn.is-loading .vcl-auth-spinner {
	display: inline-block;
}

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

.vcl-auth-switch {
	margin-top: 14px;
	font-size: 12px;
	text-align: center;
	color: #555555;
}

.vcl-auth-footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 10px;
	font-weight: 600;
	color: #222222;
}

.vcl-auth-footer a {
	color: #222222;
	text-decoration: none;
}

/* Square slider (desktop only). */
.vcl-auth-slider {
	position: relative;
	display: block;
	margin: 12px 12px 12px 0;
	min-height: 360px;
	overflow: hidden;
	border-radius: 12px;
	background: #1b1b1b;
}

/* Prefixed to beat WooCommerce's ".woocommerce img { height: auto }" on shop pages, which left the photo shorter than the frame. */
.vcl-auth-modal .vcl-auth-slider .vcl-auth-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0;
	transition: opacity .6s ease;
}

.vcl-auth-modal .vcl-auth-slider .vcl-auth-slide.is-active {
	opacity: 1;
}

/* Tablet and mobile: single column, no slider. */
@media (max-width: 820px) {
	.vcl-auth-modal {
		padding: 16px;
	}

	.vcl-auth-modal-dialog {
		display: block;
		max-width: 420px;
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}

	.vcl-auth-slider {
		display: none;
	}

	.vcl-auth-pane {
		min-height: 0;
		padding: 14px 18px 12px;
	}

	.vcl-auth-modal-body {
		padding-bottom: 20px;
	}

	.vcl-auth-footer {
		font-size: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vcl-auth-modal,
	.vcl-auth-modal-dialog,
	.vcl-auth-slide {
		transition: none;
	}
}

.vcl-auth-google-btn + .vcl-auth-google-btn {
	margin-top: 8px;
}

.vcl-auth-notice .vcl-auth-resend {
	font-weight: 600;
	color: inherit;
	text-decoration: underline;
}

.vcl-auth-notice.is-info {
	border-left-color: #2a6fb0;
	background: #eef5fb;
	color: #1b4a75;
}
