// Auto-Renew Toggle Styles
.arraysubs-auto-renew-toggle-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.arraysubs-auto-renew-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;

	&:focus {
		outline: 2px solid #2271b1;
		outline-offset: 2px;
		border-radius: 12px;
	}

	&__track {
		position: relative;
		display: inline-block;
		width: 40px;
		height: 22px;
		border-radius: 11px;
		background-color: #b4b9be;
		transition: background-color 0.2s ease;
	}

	&__thumb {
		position: absolute;
		top: 2px;
		left: 2px;
		width: 18px;
		height: 18px;
		border-radius: 50%;
		background-color: #fff;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
		transition: transform 0.2s ease;
	}

	&__label {
		font-weight: 600;
		color: #50575e;
		min-width: 24px;
	}

	&__status-text {
		color: #646970;
		font-size: 13px;
		line-height: 1.4;
	}

	// ON state
	&--on {

		.arraysubs-auto-renew-toggle__track {
			background-color: #00a32a;
		}

		.arraysubs-auto-renew-toggle__thumb {
			transform: translateX(18px);
		}

		.arraysubs-auto-renew-toggle__label {
			color: #00a32a;
		}
	}

	// OFF state
	&--off {

		.arraysubs-auto-renew-toggle__track {
			background-color: #b4b9be;
		}

		.arraysubs-auto-renew-toggle__label {
			color: #d63638;
		}
	}

	// Loading state
	&--loading {
		pointer-events: none;
		opacity: 0.6;

		.arraysubs-auto-renew-toggle__thumb {
			animation: arraysubs-toggle-pulse 1s infinite;
		}
	}
}

@keyframes arraysubs-toggle-pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.4;
	}
}

// Responsive
@media (max-width: 600px) {

	.arraysubs-auto-renew-toggle-wrapper {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
}
