/* =========================================================
   TheCuraLine Membership Plans
   Standalone membership cards + modal styling
========================================================= */

body.thecuraline-membership-modal-open {
	overflow: hidden;
}

.thecuraline-membership-pricing .uc-pricing__grid {
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.thecuraline-membership-pricing .uc-pricing__lead p {
	margin: 0;
}

.thecuraline-membership-pricing .uc-pricing__card:not(.thecuraline-membership-card--featured) h3 {
	color: rgba(21, 18, 16, 0.62);
}

.thecuraline-membership-card--featured h3 {
	color: var(--thecuraline-color-dark);
}

/* Read More */
.thecuraline-membership-explore {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	width: auto;
	margin: 0 0 var(--thecuraline-space-gap-pricing);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--thecuraline-color-primary);
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-price-cta-size);
	font-style: italic;
	font-weight: var(--thecuraline-font-weight-regular);
	line-height: var(--thecuraline-type-price-cta-line-height);
	text-align: left;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.thecuraline-membership-explore::after {
	content: "\2192";
	display: inline-block;
	font-style: normal;
	transition: transform 180ms ease;
}

.thecuraline-membership-explore:hover,
.thecuraline-membership-explore:focus-visible {
	opacity: 0.75;
}

.thecuraline-membership-explore:hover::after,
.thecuraline-membership-explore:focus-visible::after {
	transform: translateX(4px);
}

/* Current Plan */
.thecuraline-membership-current-status {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.thecuraline-membership-current-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 30px;
	padding: 5px 14px;
	border: 1px solid rgba(69, 0, 17, 0.3);
	border-radius: 999px;
	background: rgba(69, 0, 17, 0.035);
	color: var(--thecuraline-color-primary);
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-menu-size);
	line-height: var(--thecuraline-type-menu-line-height);
	font-weight: var(--thecuraline-font-weight-medium);
	white-space: nowrap;
}

.thecuraline-membership-current-badge::before {
	content: "";
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
}

/* Modal */
.thecuraline-membership-modal[hidden] {
	display: none !important;
}

.thecuraline-membership-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	width: 100vw;
	height: 100vh;
	min-height: 100svh;
	padding: 24px;
	box-sizing: border-box;
}

.thecuraline-membership-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.58);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

/* Matches the existing Circle login panel */
.thecuraline-membership-modal__dialog {
	position: relative;
	z-index: 2;
	width: min(100%, 540px);
	max-height: calc(100svh - 48px);
	padding: var(--thecuraline-space-md) var(--thecuraline-space-md) var(--thecuraline-space-sm);
	box-sizing: border-box;
	border-radius: 38px;
	background: rgba(65, 10, 24, 0.82);
	color: var(--thecuraline-color-light);
	text-align: center;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.thecuraline-membership-modal.is-open .thecuraline-membership-modal__dialog {
	opacity: 1;
	transform: translateY(0);
}

.thecuraline-membership-modal__close {
	position: absolute;
	top: var(--thecuraline-space-xs);
	right: var(--thecuraline-space-xs);
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: var(--thecuraline-color-light);
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-menu-size);
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.thecuraline-membership-modal__close:hover,
.thecuraline-membership-modal__close:focus-visible {
	opacity: 0.7;
}

/* Modal typography */
.thecuraline-membership-modal__eyebrow {
	margin: 0 0 10px;
	color: var(--thecuraline-color-light);
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-menu-size);
	line-height: var(--thecuraline-type-menu-line-height);
	font-weight: var(--thecuraline-font-weight-bold);
	text-transform: uppercase;
}

.thecuraline-membership-modal__title {
	margin: 0 40px var(--thecuraline-space-xs);
	color: var(--thecuraline-color-light);
	font-family: var(--thecuraline-font-family-display);
	font-size: var(--thecuraline-type-section-subtitle-size);
	line-height: 1;
	font-weight: var(--thecuraline-font-weight-regular);
}

.thecuraline-membership-modal__price {
	margin: 0 0 var(--thecuraline-space-sm);
	color: var(--thecuraline-color-light);
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-menu-size);
	line-height: var(--thecuraline-type-menu-line-height);
	font-weight: var(--thecuraline-font-weight-bold);
}

.thecuraline-membership-modal__content {
	color: var(--thecuraline-color-light);
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-menu-size);
	line-height: 1.5;
	font-weight: var(--thecuraline-font-weight-regular);
	text-align: left;
}

.thecuraline-membership-modal__content > *:first-child {
	margin-top: 0;
}

.thecuraline-membership-modal__content > *:last-child {
	margin-bottom: 0;
}

.thecuraline-membership-modal__content p {
	margin: 0 0 var(--thecuraline-space-xs);
	color: inherit;
}

.thecuraline-membership-modal__content strong,
.thecuraline-membership-modal__content b {
	color: inherit;
	font-weight: var(--thecuraline-font-weight-bold);
}

.thecuraline-membership-modal__content h2,
.thecuraline-membership-modal__content h3,
.thecuraline-membership-modal__content h4 {
	margin: var(--thecuraline-space-xs) 0 12px;
	color: inherit;
	font-family: var(--thecuraline-font-family-body);
	font-size: var(--thecuraline-type-menu-size);
	line-height: 1.4;
	font-weight: var(--thecuraline-font-weight-bold);
}

.thecuraline-membership-modal__content ul,
.thecuraline-membership-modal__content ol {
	margin: 18px 0 0;
	padding-left: 20px;
}

.thecuraline-membership-modal__content li {
	color: inherit;
}

.thecuraline-membership-modal__content li + li {
	margin-top: 10px;
}

.thecuraline-membership-modal__content a {
	color: var(--thecuraline-color-light) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

/* Popup CTA */
.thecuraline-membership-modal__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: var(--thecuraline-space-sm);
}

.thecuraline-membership-modal__cta a,
.thecuraline-membership-modal__cta button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 120px;
	min-height: 30px;
	padding: 5px 20px;
	border: 1px solid var(--thecuraline-color-light);
	border-radius: 999px;
	background: transparent;
	color: var(--thecuraline-color-light) !important;
	font-family: var(--thecuraline-font-family-display);
	font-size: var(--thecuraline-type-price-badge-size);
	line-height: var(--thecuraline-type-price-badge-line-height);
	font-weight: var(--thecuraline-font-weight-semibold);
	text-decoration: none !important;
	text-align: center;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.thecuraline-membership-modal__cta a:hover,
.thecuraline-membership-modal__cta a:focus-visible,
.thecuraline-membership-modal__cta button:hover,
.thecuraline-membership-modal__cta button:focus-visible {
	opacity: 0.72;
	transform: translateY(-1px);
}

.thecuraline-membership-modal .thecuraline-membership-current-badge {
	border-color: rgba(255, 255, 255, 0.72);
	background: transparent;
	color: var(--thecuraline-color-light);
}

/* Optional membership action links */
.thecuraline-membership-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.thecuraline-membership-actions a + a::before {
	content: "|";
	display: inline-block;
	margin-right: 12px;
	text-decoration: none;
}

/* Tablet / mobile */
@media (max-width: 900px) {
	.thecuraline-membership-pricing .uc-pricing__card {
		order: initial !important;
	}

	.thecuraline-membership-modal {
		padding: 18px;
	}

	.thecuraline-membership-modal__dialog {
		width: min(100%, 540px);
		max-height: calc(100svh - 36px);
		padding: var(--thecuraline-space-sm) var(--thecuraline-space-xs);
		border-radius: 30px;
	}

	.thecuraline-membership-modal__close {
		top: 18px;
		right: 18px;
	}

	.thecuraline-membership-modal__title {
		margin-right: 30px;
		margin-left: 30px;
		font-size: clamp(32px, 10vw, 46px);
	}

	.thecuraline-membership-modal__price {
		margin-bottom: var(--thecuraline-space-xs);
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.thecuraline-membership-modal {
		padding: 12px;
	}

	.thecuraline-membership-modal__dialog {
		max-height: calc(100svh - 24px);
		padding: 44px 20px 28px;
		border-radius: 26px;
	}

	.thecuraline-membership-modal__close {
		top: 14px;
		right: 14px;
	}

	.thecuraline-membership-modal__title {
		margin-right: 24px;
		margin-left: 24px;
	}

	.thecuraline-membership-modal__content {
		font-size: 14px;
		line-height: 1.5;
	}

	.thecuraline-membership-current-status {
		margin-top: 22px;
	}
}