/**
 * Elementor widget: Membership Plans.
 *
 * The seat-priced content is switched with :has() on the panel — the picker is
 * a real radio group, so it works with the keyboard and without JavaScript.
 */

.dtg-mp {
	--dtg-mp-accent: #1f6494;
	--dtg-mp-accent-soft: #e7f1f9;
	--dtg-mp-accent-soft-2: #f4f9fc;
	--dtg-mp-accent-line: #cfe1ee;
	--dtg-mp-disabled: #aec2d1;
	--dtg-mp-disabled-line: #d6e3ed;
	--dtg-mp-number-font: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--dtg-mp-ink: #11212e;
	--dtg-mp-body: #3f4952;
	--dtg-mp-muted: #697680;
	--dtg-mp-line: #e4ebf0;
	--dtg-mp-check: #2f7d4f;
	--dtg-mp-panel-bg: #fff;
	--dtg-mp-radius: 24px;
	--dtg-mp-button-bg: var(--dtg-mp-accent);
	--dtg-mp-button-color: #fff;

	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	gap: 24px;
	color: var(--dtg-mp-body);
}

.dtg-mp__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 34px;
	background: var(--dtg-mp-panel-bg);
	border: 1px solid var(--dtg-mp-line);
	border-radius: var(--dtg-mp-radius);
	box-shadow: 0 8px 24px rgba(13, 36, 51, 0.05);
}

.dtg-mp__panel--individual {
	border: 2px solid var(--dtg-mp-accent);
	box-shadow: 0 24px 60px rgba(13, 36, 51, 0.1);
}

.dtg-mp__badge {
	position: absolute;
	top: -13px;
	left: 34px;
	padding: 5px 13px;
	background: var(--dtg-mp-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	border-radius: 999px;
}

.dtg-mp__title {
	margin: 4px 0;
	color: var(--dtg-mp-ink);
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.dtg-mp__blurb {
	margin: 0 0 20px;
	color: var(--dtg-mp-muted);
	font-size: 14.5px;
}

/* Seat picker — the radios hold the state, the stepper draws it. */
.dtg-mp__seats {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.dtg-mp__seats-legend {
	padding: 0;
	margin: 0 0 9px;
	color: var(--dtg-mp-muted);
	font-size: 13px;
	font-weight: 600;
}

.dtg-mp__sr,
.dtg-mp__seat {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.dtg-mp__stepper {
	--dtg-mp-swap-display: flex;
}

.dtg-mp__step {
	align-items: center;
	-webkit-user-select: none;
	user-select: none;
	justify-content: space-between;
	gap: 12px;
	padding: 10px;
	background: var(--dtg-mp-accent-soft);
	border: 1px solid var(--dtg-mp-accent-line);
	border-radius: 14px;
}

/* The radio group is the real control, so focus has to show on the stepper. */
.dtg-mp__seats:has(.dtg-mp__seat:focus-visible) .dtg-mp__step {
	outline: 2px solid var(--dtg-mp-accent);
	outline-offset: 2px;
}

.dtg-mp__step-button {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: #fff;
	color: var(--dtg-mp-accent);
	border: 1px solid var(--dtg-mp-accent);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(13, 36, 51, 0.06);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.dtg-mp__step-button:hover {
	background: var(--dtg-mp-accent);
	color: #fff;
}

.dtg-mp__step-button--disabled {
	background: var(--dtg-mp-accent-soft-2);
	color: var(--dtg-mp-disabled);
	border-color: var(--dtg-mp-disabled-line);
	box-shadow: none;
	cursor: not-allowed;
}

.dtg-mp__step-value {
	min-width: 0;
	text-align: center;
}

.dtg-mp__step-number {
	display: block;
	color: var(--dtg-mp-ink);
	font-family: var(--dtg-mp-number-font);
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
}

.dtg-mp__step-word {
	display: block;
	margin-top: 2px;
	color: var(--dtg-mp-muted);
	font-size: 12.5px;
	white-space: nowrap;
}

.dtg-mp__stepper-note {
	margin: 10px 0 0;
	color: var(--dtg-mp-muted);
	font-size: 13px;
}

/* Seat-dependent content: one child per seat count, in order. */
.dtg-mp__swap > * {
	display: none;
}

.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(1):checked) .dtg-mp__swap > :nth-child(1),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(2):checked) .dtg-mp__swap > :nth-child(2),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(3):checked) .dtg-mp__swap > :nth-child(3),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(4):checked) .dtg-mp__swap > :nth-child(4),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(5):checked) .dtg-mp__swap > :nth-child(5),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(6):checked) .dtg-mp__swap > :nth-child(6),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(7):checked) .dtg-mp__swap > :nth-child(7),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(8):checked) .dtg-mp__swap > :nth-child(8),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(9):checked) .dtg-mp__swap > :nth-child(9),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(10):checked) .dtg-mp__swap > :nth-child(10),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(11):checked) .dtg-mp__swap > :nth-child(11),
.dtg-mp__panel:has(.dtg-mp__seat:nth-of-type(12):checked) .dtg-mp__swap > :nth-child(12) {
	display: var(--dtg-mp-swap-display, block);
}

/* Without :has(), the panel falls back to showing the first tier. */
@supports not selector(:has(*)) {
	.dtg-mp__swap > :first-child {
		display: var(--dtg-mp-swap-display, block);
	}
}

/* Editor-only warning about an unresolved SKU. */
.dtg-mp__editor-notice {
	margin: 0 0 16px;
	padding: 9px 13px;
	background: #fdf3e7;
	border-radius: 10px;
	color: #8a5a1a;
	font-size: 13px;
	font-weight: 600;
}

/* What a quantity discount saves — inline with the total, so the block does
   not change height when it appears. */
.dtg-mp__saving {
	display: inline-block;
	margin: 0;
	padding: 3px 10px;
	background: var(--dtg-mp-saving-bg, #e4efe7);
	border-radius: 999px;
	color: var(--dtg-mp-saving-color, #2f7d4f);
	font-size: 13px;
	font-weight: 700;
}

/* Per-user breakdown under the total. */
.dtg-mp__price-each {
	margin: 8px 0 0;
	color: var(--dtg-mp-muted);
	font-size: 14px;
	font-weight: 600;
}

.dtg-mp__actions,
.dtg-mp__action {
	margin-top: auto;
}

.dtg-mp__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	min-height: 50px;
	margin: 0;
}

.dtg-mp__price-value {
	color: var(--dtg-mp-ink);
	font-size: 46px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
}

.dtg-mp__price--custom .dtg-mp__price-value {
	font-size: 40px;
}

/* wc_price() wraps the amount, so let its markup take the price styling. */
.dtg-mp__price-value :is(bdi, span),
.dtg-mp__price-each :is(bdi, span) {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
}

.dtg-mp__price-unit {
	color: var(--dtg-mp-muted);
	font-size: 14.5px;
	font-weight: 600;
}

.dtg-mp__note {
	margin: 10px 0 22px;
	color: var(--dtg-mp-muted);
	font-size: 13px;
}

/* Features */
.dtg-mp__features {
	display: flex;
	flex-direction: column;
	gap: 13px;
	margin: 0 0 26px;
	padding: 0;
	list-style: none;
}

.dtg-mp__feature {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	color: var(--dtg-mp-body);
	font-size: 15px;
	line-height: 1.45;
}

.dtg-mp__icon {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--dtg-mp-check);
}

.dtg-mp__feature--accent .dtg-mp__icon {
	color: var(--dtg-mp-accent);
}

/* Buttons */
.dtg-mp__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 15px 22px;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	border-radius: 999px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dtg-mp__button--primary {
	background: var(--dtg-mp-button-bg);
	color: var(--dtg-mp-button-color);
	border: 1px solid transparent;
}

.dtg-mp__button--primary:hover,
.dtg-mp__button--primary:focus {
	background: var(--dtg-mp-ink);
	color: var(--dtg-mp-button-color);
}

.dtg-mp__button--secondary {
	background: #fff;
	color: var(--dtg-mp-accent);
	border: 1px solid var(--dtg-mp-line);
}

.dtg-mp__button--secondary:hover,
.dtg-mp__button--secondary:focus {
	background: var(--dtg-mp-accent-soft);
	color: var(--dtg-mp-accent);
}

.dtg-mp__button-icon {
	flex: none;
	width: 17px;
	height: 17px;
}

@media (max-width: 767px) {
	.dtg-mp {
		grid-template-columns: minmax(0, 1fr);
	}

	.dtg-mp__step-button {
		width: 48px;
		height: 48px;
	}
}
