/**
 * OTP Login for WooCommerce (MSG91) — front-end styles.
 * Scoped under .qolo-wrapper to avoid clashing with theme styles.
 */

.qolo-wrapper {
	margin: 0 0 18px;
	max-width: 100%;
}

.qolo-wrapper * {
	box-sizing: border-box;
}

.qolo-heading {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
}

.qolo-heading--credentials {
	margin-top: 4px;
}

.qolo-label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
}

.qolo-phone-row {
	display: flex;
	align-items: stretch;
	gap: 6px;
	margin-bottom: 10px;
}

.qolo-country {
	flex: 0 0 auto;
	max-width: 120px;
	min-width: 84px;
}

.qolo-dial {
	display: flex;
	align-items: center;
	padding: 0 8px;
	font-weight: 600;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	white-space: nowrap;
}

.qolo-wrapper input.qolo-phone,
.qolo-wrapper input.qolo-otp,
.qolo-wrapper input.qolo-email,
.qolo-wrapper select.qolo-country {
	width: 100%;
	padding: 12px;
	font-size: 15px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	line-height: 1.3;
}

.qolo-wrapper input.qolo-phone {
	flex: 1 1 auto;
}

.qolo-wrapper input.qolo-otp,
.qolo-wrapper input.qolo-email {
	margin-bottom: 10px;
}

.qolo-wrapper .qolo-btn {
	width: 100%;
	cursor: pointer;
}

.qolo-otp-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	font-size: 13px;
	flex-wrap: wrap;
}

.qolo-otp-actions a {
	text-decoration: underline;
	cursor: pointer;
}

.qolo-change-number {
	color: #b91c1c;
}

.qolo-resend-timer {
	color: #6b7280;
}

.qolo-message {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
}

.qolo-message.qolo-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.qolo-message.qolo-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.qolo-message.qolo-info {
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}

.qolo-divider {
	border: none;
	height: 1px;
	background: #e5e7eb;
	margin: 22px 0;
}

.qolo-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Spinner — hidden by default; the [hidden] attribute (toggled from JS) must win.
   A plain `.qolo-spinner { display:flex }` would override the browser's
   [hidden]{display:none}, forcing the spinner visible on page load. */
.qolo-spinner {
	display: none;
	justify-content: center;
	margin-top: 12px;
}

.qolo-spinner:not([hidden]) {
	display: flex;
}

.qolo-spinner-dot {
	width: 22px;
	height: 22px;
	border: 3px solid #d1d5db;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: qolo-spin 0.7s linear infinite;
}

@keyframes qolo-spin {
	to {
		transform: rotate(360deg);
	}
}

.qolo-spinner {
	display: none !important;
}

/* Small screens */
@media (max-width: 480px) {
	.qolo-wrapper {
		max-width: 100%;
	}

	.qolo-country {
		max-width: 96px;
		min-width: 72px;
	}
}
