.col-otp-login,
.col-otp-login *,
.col-otp-login *::before,
.col-otp-login *::after {
	box-sizing: border-box;
}

/* Neutralise the surrounding theme's global element styles (buttons, inputs,
   headings, links) so this widget renders consistently regardless of what
   page it's dropped into. :where() keeps this at zero specificity so every
   real rule below still wins. */
:where(.col-otp-login) :where(h3, p, label, button, input, a) {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	line-height: normal;
	text-align: inherit;
	text-transform: none;
	letter-spacing: normal;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}

.col-otp-login {
	--col-primary: #843685;
	--col-primary-2: #b23fae;
	--col-primary-dark: #5c2560;
	--col-primary-light: #f6edf7;
	--col-text: #18121a;
	--col-muted: #6f6875;
	--col-border: #ece6ee;
	--col-error: #d63638;
	--col-success: #2fa84f;

	position: relative;
	max-width: 400px;
	width: 100%;
	margin: 0 auto 2.5em;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
	animation: colEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes colEnter {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.col-card {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 22px;
	padding: 34px 30px 26px;
	box-shadow:
		0 1px 1px rgba(40, 12, 42, 0.03),
		0 8px 24px rgba(40, 12, 42, 0.08),
		0 28px 64px -12px rgba(40, 12, 42, 0.22);
	border: 1px solid rgba(132, 54, 133, 0.08);
	overflow: hidden;
	isolation: isolate;
}

.col-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 96px;
	background: linear-gradient(180deg, rgba(132, 54, 133, 0.06), transparent);
	pointer-events: none;
	z-index: -1;
}

.col-card::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--col-primary), var(--col-primary-2), var(--col-primary));
	background-size: 200% 100%;
	animation: colShimmerBar 3.5s linear infinite;
}

@keyframes colShimmerBar {
	to { background-position: -200% 0; }
}

.col-brand {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 56px;
	margin-bottom: 22px;
}

.col-logo,
.col-brand img {
	max-height: 56px;
	max-width: 200px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 3px 8px rgba(132, 54, 133, 0.18));
}

.col-brand-name {
	font-weight: 700;
	font-size: 22px;
	color: var(--col-text);
}

.col-progress-track {
	height: 4px;
	border-radius: 2px;
	background: var(--col-border);
	margin: 0 0 26px;
	overflow: hidden;
}

.col-progress-fill {
	display: block;
	height: 100%;
	width: 33%;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--col-primary), var(--col-primary-2));
	transition: width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.col-otp-step {
	display: none;
	text-align: center;
}

.col-otp-step.is-active {
	display: block;
	animation: colFadeSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes colFadeSlide {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.col-icon-badge {
	position: relative;
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--col-primary-light), #fff);
	color: var(--col-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(132, 54, 133, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.col-icon-badge svg {
	width: 24px;
	height: 24px;
	position: relative;
	z-index: 1;
}

.col-icon-pulse {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1.5px solid var(--col-primary);
	opacity: 0.6;
	animation: colPulseRing 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes colPulseRing {
	0% {
		transform: scale(1);
		opacity: 0.55;
	}
	100% {
		transform: scale(1.7);
		opacity: 0;
	}
}

.col-title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--col-text);
}

.col-subtitle {
	margin: 0 0 24px;
	font-size: 13.5px;
	color: var(--col-muted);
	line-height: 1.55;
}

.col-subtitle strong {
	color: var(--col-text);
}

.col-label {
	display: block;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--col-muted);
	margin-bottom: 8px;
}

.col-phone-row {
	display: flex;
	align-items: center;
	background: #fbf9fc;
	border: 1.5px solid var(--col-border);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 20px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.col-phone-row:focus-within {
	border-color: var(--col-primary);
	background: #fff;
	box-shadow: 0 0 0 4px var(--col-primary-light);
}

.col-country-code {
	padding: 14px 12px;
	background: rgba(132, 54, 133, 0.06);
	border-right: 1.5px solid var(--col-border);
	color: var(--col-text);
	font-size: 14.5px;
	font-weight: 500;
	white-space: nowrap;
}

.col-otp-login input[type="tel"] {
	flex: 1;
	min-width: 0;
	min-height: 0 !important;
	border: none;
	outline: none;
	padding: 14px 14px !important;
	margin: 0 !important;
	line-height: normal !important;
	font-size: 15px;
	font-family: inherit;
	text-align: left !important;
	width: 100%;
	color: var(--col-text);
	background: transparent;
}

.col-btn {
	position: relative;
	width: 100%;
	padding: 15px 16px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--col-primary), var(--col-primary-2));
	background-size: 160% 160%;
	background-position: 0% 50%;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background-position 0.5s ease;
	box-shadow: 0 8px 20px rgba(132, 54, 133, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	overflow: hidden;
	isolation: isolate;
}

.col-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(132, 54, 133, 0.4);
	background-position: 100% 50%;
}

.col-btn:active:not(:disabled) {
	transform: translateY(0);
}

.col-btn:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

.col-btn-ripple {
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	transform: scale(0);
	animation: colRipple 0.6s ease-out;
	pointer-events: none;
	z-index: 0;
}

@keyframes colRipple {
	to {
		transform: scale(1);
		opacity: 0;
	}
}

.col-spinner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	animation: colSpin 0.7s linear infinite;
}

@keyframes colSpin {
	to {
		transform: rotate(360deg);
	}
}

.col-edit-link {
	color: var(--col-primary) !important;
	font-weight: 600;
	font-size: 12.5px;
	text-decoration: none;
	white-space: nowrap;
}

.col-edit-link:hover {
	text-decoration: underline;
}

.col-otp-boxes {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(6px, 2vw, 10px);
	max-width: 320px;
	margin: 0 auto 22px;
}

/* The theme applies a global rule to every input[type=text] (padding, a fixed
   min-height, a forced line-height) that has higher specificity than a bare
   .col-otp-box class, which was clipping the digits. Qualifying under the
   wrapper class plus !important guarantees our sizing always wins here. */
.col-otp-login .col-otp-box {
	width: 100% !important;
	aspect-ratio: 4 / 5;
	min-width: 0;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1 !important;
	text-align: center !important;
	font-size: clamp(16px, 5.5vw, 21px) !important;
	font-weight: 700;
	font-family: inherit;
	color: var(--col-text);
	background: #fbf9fc;
	border: 1.5px solid var(--col-border);
	border-radius: 12px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.col-otp-login .col-otp-box:focus {
	border-color: var(--col-primary);
	background: #fff;
	box-shadow: 0 0 0 4px var(--col-primary-light);
}

.col-otp-login .col-otp-box.is-filled {
	border-color: var(--col-primary);
	background: #fff;
	animation: colPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes colPop {
	0% { transform: scale(1); }
	50% { transform: scale(1.12); }
	100% { transform: scale(1); }
}

.col-resend {
	margin: 18px 0 0;
	font-size: 13px;
	color: var(--col-muted);
}

.col-resend a {
	color: var(--col-primary);
	font-weight: 600;
	text-decoration: none;
}

.col-resend a:hover {
	text-decoration: underline;
}

.col-error {
	color: var(--col-error);
	font-size: 13px;
	margin: 12px 0 0;
	animation: colShake 0.3s ease;
}

@keyframes colShake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

#col-step-success {
	padding: 6px 0 4px;
}

.col-success-check {
	width: 68px;
	height: 68px;
	margin: 0 auto 16px;
	display: block;
	filter: drop-shadow(0 6px 16px rgba(47, 168, 79, 0.35));
}

.col-success-circle {
	stroke: var(--col-success);
	stroke-width: 3;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: colDrawCircle 0.5s ease forwards;
}

.col-success-tick {
	stroke: var(--col-success);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 36;
	stroke-dashoffset: 36;
	animation: colDrawTick 0.3s ease 0.45s forwards;
}

@keyframes colDrawCircle {
	to { stroke-dashoffset: 0; }
}

@keyframes colDrawTick {
	to { stroke-dashoffset: 0; }
}

.col-secured-by {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--col-border);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--col-muted);
}

.col-secured-by svg {
	flex-shrink: 0;
	color: var(--col-primary);
}

@media (max-width: 420px) {
	.col-card {
		padding: 28px 20px 22px;
		border-radius: 18px;
	}
}
