/* =========================================================================
   GREEN LION — LOGIN MODAL
   Append to: /wp-content/themes/xstore-child/style.css

   Written as FLAT, valid CSS on purpose. The rest of style.css uses
   SCSS-style nesting; until it's confirmed whether that file is
   preprocessed, nothing here relies on nesting to work.

   Set --gl-green once to match your brand and the whole modal follows.
   ========================================================================= */

:root {
	--gl-green: #4a8b2c;
	--gl-green-dark: #3a6f22;
	--gl-red: #c02323;
	--gl-red-bg: #fdecec;
	--gl-green-bg: #edf7e8;
	--gl-border: #d9dde1;
	--gl-text: #1c2024;
	--gl-muted: #6b7280;
}

/* ---------- Container ---------- */

.gl-login-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: none;
}

.gl-login-modal.is-open {
	display: block;
}

.gl-login-modal[hidden] {
	display: none;
}

html.gl-login-modal-open,
html.gl-login-modal-open body {
	overflow: hidden;
}

/* ---------- Overlay ---------- */

.gl-login-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(16, 20, 24, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

/* ---------- Dialog ---------- */

.gl-login-modal__dialog {
	position: relative;
	z-index: 2;
	width: calc(100% - 32px);
	max-width: 420px;
	margin: 0 auto;
	top: 50%;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	padding: 32px 32px 28px;
	box-sizing: border-box;
}

/* ---------- Close ---------- */

.gl-login-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	line-height: 1;
	font-size: 26px;
	color: var(--gl-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
}

.gl-login-modal__close:hover,
.gl-login-modal__close:focus {
	background: #f2f4f6;
	color: var(--gl-text);
}

/* ---------- Title ---------- */

.gl-login-modal__title {
	margin: 0 0 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--gl-border);
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--gl-text);
}

/* ---------- Notice (error red / success green) ---------- */

.gl-login-modal__notice {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 8px;
	border-left: 4px solid transparent;
	font-size: 14px;
	line-height: 1.45;
}

.gl-login-modal__notice[hidden] {
	display: none;
}

.gl-login-modal__notice.is-error {
	background: var(--gl-red-bg);
	border-left-color: var(--gl-red);
	color: var(--gl-red);
}

.gl-login-modal__notice.is-success,
.gl-login-modal__notice.is-info {
	background: var(--gl-green-bg);
	border-left-color: var(--gl-green);
	color: var(--gl-green-dark);
}

.gl-login-modal__notice a {
	color: inherit;
	text-decoration: underline;
}

/* ---------- Fields ---------- */

.gl-login-modal__field {
	margin: 0 0 16px;
}

.gl-login-modal__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--gl-text);
}

.gl-login-modal__field input {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font-size: 16px; /* 16px stops iOS Safari zooming on focus */
	color: var(--gl-text);
	background: #fff;
	border: 1px solid var(--gl-border);
	border-radius: 8px;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.gl-login-modal__field input:focus {
	outline: none;
	border-color: var(--gl-green);
	box-shadow: 0 0 0 3px rgba(74, 139, 44, 0.18);
}

/* ---------- Remember me ---------- */

.gl-login-modal__remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--gl-muted);
	cursor: pointer;
}

.gl-login-modal__remember input {
	width: 16px;
	height: 16px;
	margin: 0;
}

/* ---------- Submit ---------- */

.gl-login-modal__submit {
	display: block;
	width: 100%;
	height: 50px;
	border: 0;
	border-radius: 8px;
	background: var(--gl-green);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background 0.15s ease;
}

.gl-login-modal__submit:hover,
.gl-login-modal__submit:focus {
	background: var(--gl-green-dark);
	color: #fff;
}

.gl-login-modal__submit.is-busy,
.gl-login-modal__submit:disabled {
	opacity: 0.65;
	cursor: default;
}

/* ---------- Footer links ---------- */

.gl-login-modal__links {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 18px;
	font-size: 14px;
}

.gl-login-modal__links a {
	color: var(--gl-green-dark);
	font-weight: 600;
	text-decoration: none;
}

.gl-login-modal__links a:hover {
	text-decoration: underline;
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
	.gl-login-modal__dialog {
		padding: 26px 20px 22px;
		border-radius: 12px;
	}

	.gl-login-modal__title {
		font-size: 18px;
	}
}