/* Yastech OTP Login — flip card */

.ystotp-root,
.ystotp-root * {
	box-sizing: border-box;
}

body.ystotp-lock {
	overflow: hidden !important;
}

/* ---------- overlay ---------- */
.ystotp-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: var(--ystotp-overlay);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .3s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.ystotp-overlay[hidden] {
	display: none !important;
}
.ystotp-overlay.is-open {
	opacity: 1;
}
/* Keyboard open: card sits at the top of the visible area. */
.ystotp-overlay.is-kb {
	align-items: flex-start;
	padding-top: 12px;
	padding-bottom: 12px;
}
.ystotp-overlay.is-kb .ystotp-scene {
	margin: 0 auto;
}

.ystotp-scene {
	width: 100%;
	max-width: 360px;
	margin: auto;
	perspective: 1200px;
}

/* ---------- card ---------- */
.ystotp-root .ystotp-card {
	font-family: var(--ystotp-font) !important;
	direction: rtl;
	text-align: center;
	color: var(--ystotp-text);
	transform: scale(.9) translateY(18px);
	opacity: 0;
	transition: transform .55s cubic-bezier(.2, .9, .3, 1.25), opacity .35s ease;
}
.ystotp-overlay.is-open .ystotp-card,
.ystotp-inline .ystotp-card {
	transform: none;
	opacity: 1;
}

.ystotp-inline {
	max-width: 380px;
	margin: 24px auto;
	perspective: 1200px;
}

.ystotp-flip {
	display: grid;
	transform-style: preserve-3d;
	transition: transform .8s cubic-bezier(.4, .1, .2, 1);
}
.ystotp-noanim .ystotp-flip {
	transition: none !important;
}
.ystotp-card.is-flipped .ystotp-flip {
	transform: rotateY(180deg);
}

.ystotp-root .ystotp-face {
	grid-area: 1 / 1;
	position: relative;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	background: var(--ystotp-bg);
	color: var(--ystotp-text);
	border: 1px solid var(--ystotp-border);
	border-radius: var(--ystotp-radius);
	box-shadow: var(--ystotp-shadow);
	padding: 24px 22px 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.ystotp-back {
	transform: rotateY(180deg);
}
.ystotp-card:not(.is-flipped) .ystotp-back,
.ystotp-card.is-flipped .ystotp-front {
	pointer-events: none;
}

/* ---------- content ---------- */
.ystotp-root .ystotp-icon-btn {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 32px;
	height: 32px;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--ystotp-soft2) !important;
	color: var(--ystotp-text) !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: none !important;
	transition: background .2s, transform .2s;
}
.ystotp-root .ystotp-icon-btn:hover {
	transform: scale(1.08);
}

.ystotp-logo {
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 2px 0 14px;
}
.ystotp-logo-img {
	max-height: 42px;
	max-width: 150px;
	width: auto;
	height: auto;
	display: block;
}
.ystotp-logo-text {
	font-size: 19px;
	font-weight: 700;
	color: var(--ystotp-text);
}

.ystotp-root .ystotp-title {
	margin: 0 0 4px !important;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--ystotp-text) !important;
}
.ystotp-root .ystotp-sub {
	margin: 0 0 18px !important;
	font-size: 13px;
	line-height: 1.8;
	color: var(--ystotp-muted) !important;
}
.ystotp-root .ystotp-link {
	color: var(--ystotp-accent) !important;
	text-decoration: none !important;
	font-weight: 600;
	cursor: pointer;
}

.ystotp-root form {
	margin: 0 !important;
	padding: 0 !important;
}

.ystotp-root .ystotp-input {
	display: block;
	width: 100% !important;
	height: 52px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--ystotp-soft) !important;
	box-shadow: 0 0 0 1.5px var(--ystotp-soft2) !important;
	color: var(--ystotp-text) !important;
	font-family: inherit !important;
	font-size: 19px !important;
	letter-spacing: 1.5px;
	text-align: center !important;
	outline: none !important;
	transition: box-shadow .25s;
}
.ystotp-root .ystotp-input::placeholder {
	color: var(--ystotp-muted);
	opacity: .55;
	letter-spacing: 1px;
}
.ystotp-root .ystotp-input:focus {
	box-shadow: 0 0 0 1.5px var(--ystotp-accent) !important;
}

/* ---------- code boxes ---------- */
.ystotp-code-wrap {
	position: relative;
	margin: 0 auto;
	width: fit-content;
}
.ystotp-boxes {
	display: flex;
	gap: 10px;
	justify-content: center;
}
.ystotp-box {
	width: 54px;
	height: 60px;
	border-radius: 14px;
	background: var(--ystotp-soft);
	box-shadow: 0 0 0 1.5px var(--ystotp-soft2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-weight: 700;
	color: var(--ystotp-text);
	transition: background .25s, box-shadow .25s, transform .25s;
}
.ystotp-box.is-active {
	box-shadow: 0 0 0 2px var(--ystotp-accent);
}
.ystotp-box.is-active::after {
	content: "";
	width: 2px;
	height: 24px;
	background: var(--ystotp-accent);
	animation: ystotp-caret 1s steps(1) infinite;
}
.ystotp-box.is-filled {
	background: var(--ystotp-accent);
	box-shadow: none;
	color: #fff;
	transform: translateY(-2px);
	animation: ystotp-bump .3s ease;
}
.ystotp-root .ystotp-code {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: transparent !important;
	caret-color: transparent !important;
	font-size: 16px !important;
	opacity: 0;
	outline: none !important;
	box-shadow: none !important;
	z-index: 2;
	cursor: text;
}
.ystotp-card.is-shake .ystotp-boxes,
.ystotp-card.is-shake .ystotp-phone {
	animation: ystotp-shake .4s ease;
}

/* ---------- buttons ---------- */
.ystotp-root .ystotp-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100% !important;
	height: 50px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 1px solid var(--ystotp-accent) !important;
	border-radius: 12px !important;
	background: var(--ystotp-accent) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: filter .2s, transform .15s, background .35s, border-color .35s;
}
.ystotp-root .ystotp-btn * {
	color: #fff !important;
}
.ystotp-root .ystotp-btn:hover {
	filter: brightness(1.06);
}
.ystotp-root .ystotp-btn:active {
	transform: scale(.98);
}
.ystotp-root .ystotp-btn-verify:not(.is-ready):not(.is-success) {
	background: var(--ystotp-soft2) !important;
	border-color: var(--ystotp-border) !important;
}
.ystotp-root .ystotp-btn.is-loading {
	pointer-events: none;
}
.ystotp-root .ystotp-btn.is-loading span {
	opacity: 0;
}
.ystotp-root .ystotp-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2.5px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	animation: ystotp-spin .7s linear infinite;
}
.ystotp-root .ystotp-btn {
	position: relative;
}
.ystotp-root .ystotp-btn.is-success {
	pointer-events: none;
	animation: ystotp-pop .4s ease;
}

.ystotp-root .ystotp-err {
	min-height: 22px;
	margin: 8px 0 6px !important;
	font-size: 12.5px;
	line-height: 1.7;
	color: #ffb4a6 !important;
}
.ystotp-root .ystotp-foot {
	margin: 12px 0 0 !important;
	font-size: 12px;
	line-height: 1.8;
	color: var(--ystotp-muted) !important;
}
.ystotp-root .ystotp-timer {
	font-size: 13px;
}

/* ---------- keyframes ---------- */
@keyframes ystotp-bump { 50% { transform: translateY(-2px) scale(1.12); } }
@keyframes ystotp-caret { 50% { opacity: 0; } }
@keyframes ystotp-spin { to { transform: rotate(360deg); } }
@keyframes ystotp-pop { 50% { transform: scale(1.04); } }
@keyframes ystotp-shake {
	20%, 60% { transform: translateX(-6px); }
	40%, 80% { transform: translateX(6px); }
}

/* ---------- mobile ---------- */
@media (max-width: 420px) {
	.ystotp-scene { max-width: 92vw; }
	.ystotp-root .ystotp-face { padding: 22px 16px 18px; }
	.ystotp-box { width: 50px; height: 56px; font-size: 22px; }
	.ystotp-boxes { gap: 8px; }
}
@media (max-width: 420px) {
	.ystotp-boxes[style*="--ystotp-len:6"] .ystotp-box,
	.ystotp-boxes[style*="--ystotp-len:5"] .ystotp-box { width: 42px; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
	.ystotp-flip, .ystotp-card, .ystotp-overlay { transition-duration: .01s !important; }
	.ystotp-box, .ystotp-btn { animation: none !important; }
}
