/**
 * Maraton — "ورود با بله" (Login with Bale) button + toast.
 *
 * Selectors intentionally match the SMS-auth plugin's specificity
 * (`.msauth-card .msauth-btn`) so the green style wins.
 */

.msauth-bale {
	margin-top: 0.85rem;
}

.msauth-card .msauth-btn--bale,
.msauth-modal .msauth-btn--bale {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 52px;
	padding: 0.85rem 1.2rem;
	border: 0;
	border-radius: 16px;
	background: linear-gradient(135deg, #16a34a 0%, #22c55e 55%, #4ade80 100%) !important;
	color: #fff !important;
	font-weight: 800;
	font-size: 0.95rem;
	line-height: 1.4;
	cursor: pointer;
	overflow: hidden;
	box-shadow:
		0 14px 30px rgba(34, 197, 94, 0.32),
		inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
	transition:
		transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.msauth-card .msauth-btn--bale:hover:not(:disabled),
.msauth-modal .msauth-btn--bale:hover:not(:disabled),
.msauth-card .msauth-btn--bale:focus-visible:not(:disabled),
.msauth-modal .msauth-btn--bale:focus-visible:not(:disabled) {
	transform: translateY(-2px);
	background: linear-gradient(135deg, #15803d 0%, #16a34a 55%, #22c55e 100%) !important;
	box-shadow:
		0 20px 40px rgba(34, 197, 94, 0.44),
		inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
	outline: none;
}

.msauth-card .msauth-btn--bale:active:not(:disabled),
.msauth-modal .msauth-btn--bale:active:not(:disabled) {
	transform: translateY(0) scale(0.99);
}

.msauth-card .msauth-btn--bale:disabled,
.msauth-modal .msauth-btn--bale:disabled {
	opacity: 0.78;
	cursor: wait;
}

.msauth-card .msauth-btn--bale .msauth-btn__text,
.msauth-modal .msauth-btn--bale .msauth-btn__text {
	color: #fff !important;
	font-weight: 800;
}

.msauth-card .msauth-btn--bale .msauth-loader,
.msauth-modal .msauth-btn--bale .msauth-loader {
	border-color: rgba(255, 255, 255, 0.45) !important;
	border-top-color: #fff !important;
}

.msauth-card .msauth-btn--bale.is-loading .msauth-loader,
.msauth-modal .msauth-btn--bale.is-loading .msauth-loader {
	display: inline-block;
}

.msauth-bale__hint {
	margin: 0.5rem 0 0;
	font-size: 0.72rem;
	line-height: 1.55;
	text-align: center;
	color: #6b7385;
}

/* ── Toast ── */
.maraton-bale-toast {
	position: fixed;
	inset-block-start: 18px;
	inset-inline: 0;
	z-index: 99999;
	width: min(92vw, 420px);
	margin-inline: auto;
	padding: 0.8rem 1rem;
	border-radius: 14px;
	border: 1px solid rgba(34, 197, 94, 0.3);
	background: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.97));
	color: #15803d;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
	opacity: 0;
	transform: translateY(-12px);
	pointer-events: none;
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.maraton-bale-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.maraton-bale-toast.is-error {
	border-color: rgba(239, 68, 68, 0.3);
	background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(255, 255, 255, 0.97));
	color: #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
	.msauth-card .msauth-btn--bale,
	.msauth-modal .msauth-btn--bale,
	.maraton-bale-toast {
		transition: none;
	}

	.msauth-card .msauth-btn--bale:hover:not(:disabled),
	.msauth-modal .msauth-btn--bale:hover:not(:disabled) {
		transform: none;
	}
}
