/* Вход по коду из письма. Окно: десктоп — диалог по центру, мобильные — шторка снизу. Форма на странице «Мой аккаунт». */

.yoa[hidden],
.yoa__view[hidden],
.yoa .yoa__link[hidden] {
	display: none !important;
}

html.yoa-locked,
html.yoa-locked body {
	overflow: hidden !important;
}

/* Консультант RetailCRM перекрывает шторку на мобильных. */
html.yoa-locked #retailcrm-consultant-app {
	display: none !important;
}

.yoa {
	color: #111;
	font-size: 15px;
	line-height: 1.4;
	-webkit-text-size-adjust: 100%;
}

/* ---------- окно ---------- */

.yoa--modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.yoa__backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.yoa.is-open .yoa__backdrop {
	opacity: 1;
}

.yoa__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 48px);
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	outline: none;
	overflow: hidden;
}

.yoa.is-open .yoa__dialog {
	opacity: 1;
	transform: none;
}

.yoa__grab {
	position: relative;
	flex: 0 0 auto;
	height: 44px;
}

.yoa__handle {
	display: none;
}

.yoa .yoa__close {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #111;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.yoa .yoa__close:hover,
.yoa .yoa__close:focus-visible {
	background: #f2f2f2;
}

.yoa__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 0 28px 24px;
}

/* ---------- форма на странице «Мой аккаунт» ---------- */

.yoa--inline {
	max-width: 440px;
	margin: 0 auto 30px;
	padding: 28px;
	border: 1px solid #e5e5e5;
}

/* ---------- общие элементы ---------- */

.yoa .yoa__title {
	margin: 0 32px 6px 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #111;
}

.yoa--inline .yoa__title {
	margin-right: 0;
}

.yoa .yoa__lead {
	margin: 0 0 20px;
	color: #555;
}

.yoa__view {
	margin: 0;
}

.yoa .yoa__field {
	margin: 0 0 16px;
}

.yoa .yoa__label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

.yoa .yoa__input {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #bbb;
	border-radius: 0;
	background: #fff;
	color: #111;
	font-size: 16px; /* меньше 16px — iOS увеличивает страницу при фокусе */
	box-shadow: none;
	transition: border-color 0.15s ease;
}

.yoa .yoa__input:focus {
	border-color: #111;
	outline: 2px solid rgba(0, 0, 0, 0.15);
	outline-offset: 0;
	box-shadow: none;
}

.yoa .yoa__input--code {
	height: 56px;
	font-size: 24px;
	letter-spacing: 8px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.yoa .yoa__field.has-error .yoa__input {
	border-color: #c0392b;
}

.yoa__error {
	display: none;
	margin-top: 6px;
	font-size: 13px;
	color: #c0392b;
}

.yoa__field.has-error .yoa__error {
	display: block;
}

.yoa .yoa__hint {
	margin: 6px 0 0;
	font-size: 13px;
	color: #666;
}

.yoa .yoa__label + .yoa__hint {
	margin: 0 0 8px;
}

.yoa .yoa__field--check {
	display: grid;
	grid-template-columns: 22px 1fr;
	column-gap: 10px;
	align-items: start;
}

.yoa .yoa__field--check input[type="checkbox"] {
	display: block;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: #111;
}

.yoa .yoa__field--check label {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: #444;
	cursor: pointer;
}

.yoa .yoa__field--check label a {
	color: inherit;
	text-decoration: underline;
}

.yoa .yoa__field--check .yoa__error {
	grid-column: 2;
}

.yoa .yoa__btn {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	line-height: 50px;
	cursor: pointer;
	box-shadow: none;
}

.yoa .yoa__btn--primary {
	background: #111;
	color: #fff;
}

.yoa .yoa__btn--primary:hover,
.yoa .yoa__btn--primary:focus-visible {
	background: #333;
	color: #fff;
}

.yoa .yoa__btn[disabled],
.yoa .yoa__btn.is-busy {
	opacity: 0.6;
	cursor: default;
}

.yoa .yoa__link {
	display: inline-block;
	min-height: 0;
	margin: 0;
	padding: 8px 0;
	border: 0;
	background: none;
	color: #111;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	box-shadow: none;
}

.yoa__resend {
	min-height: 36px;
	margin-top: 10px;
	font-size: 14px;
	color: #666;
	text-align: center;
}

.yoa__alt {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 16px;
	margin-top: 8px;
}

.yoa .yoa__step-title {
	margin: 0 0 14px;
	font-weight: 700;
}

.yoa .yoa__sent {
	margin: 0 0 10px;
	font-size: 15px;
	overflow-wrap: anywhere;
}

.yoa .yoa__notice {
	margin: 0 0 16px;
	padding: 10px 12px;
	border-left: 3px solid #111;
	background: #f4f4f4;
	font-size: 14px;
	line-height: 1.45;
}

.yoa__message:empty {
	display: none;
}

.yoa__message {
	margin-top: 14px;
	padding: 10px 12px;
	background: #f2f2f2;
	font-size: 14px;
}

.yoa__message.is-error {
	background: #fdecea;
	color: #8a1f14;
}

.yoa .yoa__support {
	margin: 18px 0 0;
	font-size: 13px;
	color: #666;
	text-align: center;
}

.yoa .yoa__support a {
	color: #111;
	white-space: nowrap;
	text-decoration: underline;
}

@media (max-width: 767px) {
	.yoa--modal {
		align-items: flex-end;
		padding: 0;
	}

	.yoa__dialog {
		position: fixed;
		left: 0;
		right: 0;
		bottom: var(--yoa-kb, 0px);
		max-width: none;
		max-height: calc(var(--yoa-vh, 100vh) - 16px);
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
		opacity: 1;
		transform: translateY(100%);
		transition: transform 0.25s ease, bottom 0.1s linear;
		will-change: transform;
	}

	.yoa.is-open .yoa__dialog {
		transform: translateY(var(--yoa-drag, 0px));
	}

	.yoa.is-dragging .yoa__dialog {
		transition: none;
	}

	.yoa__grab {
		height: 36px;
		touch-action: none;
		cursor: grab;
	}

	.yoa__handle {
		display: block;
		position: absolute;
		top: 8px;
		left: 50%;
		width: 40px;
		height: 5px;
		margin-left: -20px;
		border-radius: 3px;
		background: #ccc;
	}

	.yoa .yoa__close {
		top: 0;
		right: 4px;
	}

	.yoa__body {
		padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0px));
	}

	/* Пока открыта клавиатура, нижний отступ под жестовую панель не нужен. */
	.yoa.is-keyboard .yoa__body {
		padding-bottom: 16px;
	}

	.yoa .yoa__title {
		font-size: 19px;
	}

	.yoa .yoa__lead {
		margin-bottom: 14px;
		font-size: 14px;
	}

	.yoa--inline {
		padding: 20px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yoa__backdrop,
	.yoa__dialog {
		transition: none !important;
	}
}
