/**
 * Belépés – nagy képernyőn legördülő panel a fejlécben,
 * mobilon alulról felcsúszó, teljes szélességű lap.
 * A téma színváltozóira épül (theme.css :root).
 */

.auth-menu {
	position: relative;
	display: inline-block;
}

/* A panel az oldal törzsébe kerül (a fejléc backdrop-filterje különben
   „bezárná" a fixed elemet), a helyét nagy képernyőn a JS számolja ki. */
.auth-panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 300;
	width: 300px;
	max-width: calc(100vw - 32px);
	padding: 18px;
	background: var(--white, #fff);
	border: 1px solid var(--line, #E5DCD0);
	border-radius: var(--radius, 16px);
	box-shadow: var(--shadow-lg, 0 20px 46px rgba(58, 58, 56, .14));
	text-align: left;
}

/* Szándékosan nincs se animáció, se átmenet: a böngésző a háttérbe tett
   lapon megállítja őket, és a panel a képernyőn kívül ragadhatna. */

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

/* Kis nyíl a gomb felé. */
.auth-panel::before {
	content: "";
	position: absolute;
	top: -7px;
	right: 22px;
	width: 12px;
	height: 12px;
	background: var(--white, #fff);
	border-left: 1px solid var(--line, #E5DCD0);
	border-top: 1px solid var(--line, #E5DCD0);
	transform: rotate(45deg);
}

/* Csak mobilon kellenek. */
.auth-backdrop,
.auth-grabber,
.auth-close,
.auth-title {
	display: none;
}

.auth-panel label {
	display: block;
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted, #7C7A73);
}

.auth-panel input[type="email"],
.auth-panel input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 12px;
	padding: 10px 12px;
	font: inherit;
	font-size: 15px;
	color: var(--ink, #3A3A38);
	background: var(--cream, #FBF8F4);
	border: 1px solid var(--line, #E5DCD0);
	border-radius: 10px;
}

.auth-panel input:focus {
	outline: none;
	border-color: var(--tan, #B4835D);
	box-shadow: 0 0 0 3px rgba(180, 131, 93, .16);
}

.auth-remember {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 2px 0 14px;
	font-size: 13.5px;
	font-weight: 400;
	color: var(--ink, #3A3A38);
	cursor: pointer;
}

.auth-remember input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--tan, #B4835D);
	flex: 0 0 auto;
}

.auth-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 16px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--radius-pill, 50px);
	cursor: pointer;
}

.auth-btn-primary {
	color: #fff;
	background: var(--tan, #B4835D);
}

.auth-btn-primary:hover {
	background: var(--tan-dark, #96683F);
}

.auth-btn-ghost {
	color: var(--sage, #5C695F);
	background: transparent;
	border-color: var(--sage, #5C695F);
}

.auth-btn-ghost:hover {
	color: #fff;
	background: var(--sage, #5C695F);
}

.auth-magic {
	margin: 10px 0 0;
	text-align: center;
}

.auth-link-btn {
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: var(--muted, #7C7A73);
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

.auth-link-btn:hover {
	color: var(--tan-dark, #96683F);
}

.auth-sep {
	position: relative;
	margin: 16px 0 12px;
	text-align: center;
}

.auth-sep::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--line, #E5DCD0);
}

.auth-sep span {
	position: relative;
	padding: 0 10px;
	font-size: 12px;
	color: var(--muted, #7C7A73);
	background: var(--white, #fff);
}

.auth-msg {
	margin: 0 0 12px;
	padding: 9px 11px;
	font-size: 13.5px;
	line-height: 1.45;
	border-radius: 10px;
}

.auth-msg.is-ok {
	color: #2C5E43;
	background: #EAF3ED;
}

.auth-msg.is-err {
	color: #8C3B29;
	background: #FBECE7;
}

/* =====================================================================
 * Mobil: alulról felcsúszó lap, ne kelljen benne görgetni.
 * ================================================================== */

@media (max-width: 1000px) {

	.auth-menu {
		display: block;
	}

	.auth-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 290;
		background: rgba(46, 42, 36, .42);
	}

	.auth-backdrop[hidden] {
		display: none;
	}

	.auth-panel {
		position: fixed;
		top: auto;
		right: 0;
		left: 0;
		bottom: 0;
		width: auto;
		max-width: none;
		max-height: 92vh;
		overflow-y: auto;
		padding: 8px 22px calc(26px + env(safe-area-inset-bottom, 0px));
		border: 0;
		border-radius: 24px 24px 0 0;
		box-shadow: 0 -14px 40px rgba(46, 42, 36, .22);
	}

	.auth-panel::before {
		display: none;
	}

	.auth-grabber {
		display: block;
		width: 42px;
		height: 4px;
		margin: 4px auto 14px;
		border-radius: 4px;
		background: var(--line, #E5DCD0);
	}

	.auth-close {
		display: block;
		position: absolute;
		top: 12px;
		right: 14px;
		width: 36px;
		height: 36px;
		font-size: 26px;
		line-height: 1;
		color: var(--muted, #7C7A73);
		background: none;
		border: 0;
		cursor: pointer;
	}

	.auth-title {
		display: block;
		margin: 0 0 16px;
		font-size: 21px;
		font-weight: 700;
		color: var(--olive, #606760);
	}

	.auth-panel label {
		font-size: 14px;
		margin-bottom: 6px;
	}

	/* 16px alatt az iPhone ránagyít a mezőre – ezt kerüljük el. */
	.auth-panel input[type="email"],
	.auth-panel input[type="password"] {
		margin-bottom: 16px;
		padding: 14px 14px;
		font-size: 16px;
		border-radius: 12px;
	}

	.auth-remember {
		margin: 2px 0 18px;
		font-size: 15px;
	}

	.auth-remember input {
		width: 20px;
		height: 20px;
	}

	.auth-btn {
		padding: 15px 18px;
		font-size: 16px;
	}

	.auth-magic {
		margin-top: 14px;
	}

	.auth-link-btn {
		font-size: 14.5px;
		padding: 6px;
	}

	.auth-sep {
		margin: 20px 0 14px;
	}

	.auth-msg {
		font-size: 14.5px;
	}

	/* Amíg nyitva a lap, a háttér ne mozogjon. */
	body.vjt-auth-open {
		overflow: hidden;
	}
}
