/* LX MemberPress Enhance — My Subscription widget (v1.17+) */

/* ------------------------------------------------------------------ *
 * Card
 * ------------------------------------------------------------------ */

.lx-mepr-mysub {
	font-size: 15px;
	line-height: 1.5;
}

.lx-mepr-mysub__item {
	display: flex;
	flex-direction: column;
	gap: 1em;
	padding: 1.25em 1.5em;
	border: 1px solid #e3e3e3;
	border-radius: 12px;
	background: #fff;
}

.lx-mepr-mysub__item + .lx-mepr-mysub__item {
	margin-top: 1em;
}

.lx-mepr-mysub__text {
	margin: 0;
}

/* Editor-only placeholder (never rendered on the live site). */
.lx-mepr-mysub--empty {
	padding: 1em 1.25em;
	border: 1px dashed #b0b0b0;
	border-radius: 8px;
	background: #f6f6f6;
	color: #666;
	font-size: 13px;
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */

.lx-mepr-mysub__buttons {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: .6em;
	justify-content: flex-start;
}

.lx-mepr-mysub__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .55em 1.3em;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: .9em;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lx-mepr-mysub__btn:hover {
	text-decoration: none;
}

.lx-mepr-mysub__btn--cancel {
	background: #fff;
	color: #a33;
	border-color: #d9b1b1;
}

.lx-mepr-mysub__btn--change {
	background: #111;
	color: #fff;
	border-color: #111;
}

/* Loading state (cancel request in flight). */
.lx-mepr-mysub__btn.is-loading {
	opacity: .75;
	cursor: wait;
	pointer-events: none;
}

.lx-mepr-mysub__spinner {
	display: none;
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: lx-mepr-mysub-spin .7s linear infinite;
}

.lx-mepr-mysub__btn.is-loading .lx-mepr-mysub__spinner {
	display: inline-block;
}

@keyframes lx-mepr-mysub-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ------------------------------------------------------------------ *
 * Dialogs
 * ------------------------------------------------------------------ */

.lx-mepr-mysub-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .55);
}

.lx-mepr-mysub-modal[hidden] {
	display: none;
}

.lx-mepr-mysub-modal__overlay {
	position: absolute;
	inset: 0;
}

.lx-mepr-mysub-modal__box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 1.75em 2em;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

.lx-mepr-mysub-modal__title {
	margin: 0 0 .5em;
	font-size: 1.2em;
	line-height: 1.3;
}

.lx-mepr-mysub-modal__message {
	margin: 0 0 1.25em;
}

.lx-mepr-mysub-modal__options {
	display: flex;
	flex-direction: column;
	gap: .6em;
	margin: 0 0 1.25em;
}

.lx-mepr-mysub-modal__option {
	display: flex;
	align-items: center;
	gap: .7em;
	padding: .8em 1em;
	border: 1px solid #dcdcdc;
	border-radius: 10px;
	background: #fafafa;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.lx-mepr-mysub-modal__option.is-selected {
	border-color: #111;
	background: #f2f2f2;
}

.lx-mepr-mysub-modal__option input[type="radio"] {
	margin: 0;
	flex: 0 0 auto;
	accent-color: #111;
}

.lx-mepr-mysub-modal__option-text {
	display: flex;
	flex-direction: column;
	gap: .15em;
	min-width: 0;
}

.lx-mepr-mysub-modal__option-title {
	font-weight: 600;
}

.lx-mepr-mysub-modal__option-terms {
	font-size: .88em;
	color: #666;
}

.lx-mepr-mysub-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6em;
	justify-content: flex-end;
	margin: 0;
}

.lx-mepr-mysub-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .55em 1.3em;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: .9em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lx-mepr-mysub-modal__btn--primary {
	background: #111;
	color: #fff;
	border-color: #111;
}

.lx-mepr-mysub-modal__btn--secondary {
	background: #fff;
	color: #444;
	border-color: #cfcfcf;
}

/* Lock page scroll while a dialog is open. */
body.lx-mysub-modal-open {
	overflow: hidden;
}
