/* Auth modal — header «Войти» */
:root {
	--auth-blue: #3D3DFF;
	--auth-blue-hover: #2A29E0;
	--auth-ink: #14151A;
	--auth-muted: #7A7E8C;
	--auth-line: #D9DEE8;
	--auth-input-bg: #F5F6F8;
	--auth-red: #E54B64;
	--auth-soft: #F3F4F6;
}

.auth-modal {
	position: fixed;
	inset: 0;
	z-index: 10060;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
.auth-modal.is-open {
	display: flex;
}
.auth-modal[hidden] {
	display: none !important;
}

.auth-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

.auth-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 24px;
	padding: 32px 28px 28px;
	box-shadow: 0 24px 60px rgba(20, 22, 40, 0.22);
	box-sizing: border-box;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

.auth-modal__close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 32px;
	height: 32px;
	border: 0;
	padding: 0;
	background: transparent;
	color: #9AA0AE;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: color 0.15s ease, background 0.15s ease;
}
.auth-modal__close:hover {
	color: var(--auth-ink);
	background: var(--auth-soft);
}

.auth-modal__title {
	margin: 0 36px 20px 0;
	font-family: 'SONGER SemiExpanded', 'Onest', sans-serif;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--auth-ink);
}

.auth-modal__subtitle {
	margin: -8px 0 18px;
	font-family: 'Onest', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--auth-ink);
	word-break: break-word;
}

.auth-modal__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.auth-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.auth-modal__input-wrap {
	position: relative;
}

.auth-modal__input {
	width: 100%;
	height: 52px;
	padding: 0 44px 0 16px;
	border: 1px solid var(--auth-line);
	border-radius: 12px;
	background: var(--auth-input-bg);
	font-family: 'Onest', Arial, sans-serif;
	font-size: 15px;
	color: var(--auth-ink);
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-modal__input:focus {
	outline: none;
	border-color: var(--auth-blue);
	box-shadow: 0 0 0 3px rgba(61, 61, 255, 0.12);
	background: #fff;
}
.auth-modal__input.is-invalid {
	border-color: var(--auth-red);
	box-shadow: none;
	background: #fff;
}
.auth-modal__field[data-auth-field] .auth-modal__input {
	/* code panel input has no trailing icon */
}
[data-auth-panel="code"] .auth-modal__input {
	padding-right: 16px;
}

.auth-modal__info {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border: 0;
	padding: 0;
	background: transparent;
	color: #9AA0AE;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.auth-modal__info:hover,
.auth-modal__info.is-open {
	color: var(--auth-blue);
}

.auth-modal__tooltip {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	z-index: 2;
	width: min(280px, calc(100vw - 72px));
	padding: 12px 14px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(20, 22, 40, 0.18);
	font-family: 'Onest', Arial, sans-serif;
	font-size: 13px;
	line-height: 1.45;
	color: var(--auth-ink);
}
.auth-modal__tooltip::before {
	content: '';
	position: absolute;
	right: 18px;
	top: -6px;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: rotate(45deg);
	box-shadow: -2px -2px 4px rgba(20, 22, 40, 0.04);
}
.auth-modal__tooltip[hidden] {
	display: none !important;
}

.auth-modal__error {
	font-family: 'Onest', Arial, sans-serif;
	font-size: 13px;
	line-height: 1.35;
	color: var(--auth-red);
}
.auth-modal__error[hidden] {
	display: none !important;
}

.auth-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	font-family: 'Onest', Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
	box-sizing: border-box;
}
.auth-modal__btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}
.auth-modal__btn--primary {
	background: var(--auth-blue);
	color: #fff;
}
.auth-modal__btn--primary:hover:not(:disabled) {
	background: var(--auth-blue-hover);
}
.auth-modal__btn--muted {
	background: var(--auth-soft);
	color: var(--auth-ink);
}
.auth-modal__btn--muted:hover:not(:disabled) {
	background: #e8eaee;
}

.auth-modal__or {
	margin: 18px 0 14px;
	text-align: center;
	font-family: 'Onest', Arial, sans-serif;
	font-size: 14px;
	color: var(--auth-muted);
}

.auth-modal__social {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.auth-modal__social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #C9D3E4;
	border-radius: 12px;
	background: #fff;
	color: var(--auth-ink);
	font-family: 'Onest', Arial, sans-serif;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	opacity: 1;
	box-sizing: border-box;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-modal__social-btn:hover:not(:disabled) {
	background: #F7F9FC;
	border-color: #AEC0DA;
}
.auth-modal__social-btn:disabled {
	cursor: not-allowed;
	opacity: 0.65;
}
.auth-modal__social-error {
	margin-top: 2px;
	text-align: center;
}
.auth-modal__social-icon {
	display: inline-flex;
	flex-shrink: 0;
}
.auth-modal__social-icon svg {
	display: block;
}

.auth-modal__timer {
	margin: 0;
	text-align: center;
	font-family: 'Onest', Arial, sans-serif;
	font-size: 14px;
	color: var(--auth-ink);
}
.auth-modal__timer[hidden] {
	display: none !important;
}

.auth-modal__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 4px;
	font-family: 'Onest', Arial, sans-serif;
	font-size: 13px;
	line-height: 1.45;
	color: #5B6170;
	cursor: pointer;
}
.auth-modal__check input {
	margin-top: 2px;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	accent-color: var(--auth-blue);
}
.auth-modal__check a {
	color: var(--auth-blue);
	text-decoration: none;
}
.auth-modal__check a:hover {
	text-decoration: underline;
}

.auth-modal__panel[hidden] {
	display: none !important;
}

html.auth-modal-open,
html.auth-modal-open body {
	overflow: hidden !important;
}

@media (max-width: 480px) {
	.auth-modal {
		padding: 12px;
	}
	.auth-modal__dialog {
		padding: 28px 20px 22px;
		border-radius: 20px;
		max-width: 100%;
	}
	.auth-modal__title {
		font-size: 24px;
	}
}
