/**
 * Pricing table two-tier switcher (MyListing Pro).
 * Migrated from MyListing Club — Pricing Table Switcher.
 */

/****** MYLISTING PRICING TABLE SWITCHER ******/
/**** MAIN CONTAINER ****/
.job_listing_packages .row:not(.monthly-section, .annual-section, .mlpro-pts-tier-primary, .mlpro-pts-tier-secondary) {
	display: none;
}
.job_listing_packages > .row > div {
	margin-bottom: unset !important;
}
/* Legacy Package Selection markup: Elementor widget with .container-fluid only (no .job_listing_packages). */
.elementor-widget-case27-package-selection-widget .container-fluid > .row.section-body:not(.monthly-section, .annual-section, .mlpro-pts-tier-primary, .mlpro-pts-tier-secondary) {
	display: none;
}
.elementor-widget-case27-package-selection-widget .container-fluid > .row > div {
	margin-bottom: unset !important;
}

/*
 * PTS JS centers tier stripes with inline max-width on tier rows. When widths are measured in a narrow
 * context (narrow Elementor column, small viewport, etc.), inline max-width cramps cards — common on pricing
 * pages packaged in boxed layouts versus full-width add-listing flows.
 */

body.mlpro-pts-pricing-switcher .elementor-widget-case27-package-selection-widget {
	container-name: mlpro-pts-pkg-widget;
	container-type: inline-size;
}

@container mlpro-pts-pkg-widget (max-width: 900px) {
	.job_listing_packages > .row.section-body.mlpro-pts-tier-primary,
	.job_listing_packages > .row.section-body.mlpro-pts-tier-secondary,
	.container-fluid > .row.section-body.mlpro-pts-tier-primary,
	.container-fluid > .row.section-body.mlpro-pts-tier-secondary {
		max-width: none !important;
	}
}

/* Browsers without size container queries rely on viewport + JS guards (pricing-table-switcher.js). */
@supports not (container-type: inline-size) {
	@media screen and (max-width: 991px) {
		body.mlpro-pts-pricing-switcher .elementor-widget-case27-package-selection-widget .job_listing_packages > .row.section-body.mlpro-pts-tier-primary,
		body.mlpro-pts-pricing-switcher .elementor-widget-case27-package-selection-widget .job_listing_packages > .row.section-body.mlpro-pts-tier-secondary {
			max-width: none !important;
		}
	}
}

@media screen and (max-width: 991px) {
	body.mlpro-pts-pricing-switcher #job_package_selection .job_listing_packages > .row.section-body.mlpro-pts-tier-primary,
	body.mlpro-pts-pricing-switcher #job_package_selection .job_listing_packages > .row.section-body.mlpro-pts-tier-secondary {
		max-width: none !important;
	}
}

@media screen and (max-width: 767px) {
	body.mlpro-pts-pricing-switcher .elementor-widget-case27-package-selection-widget .select-plan.buttons {
		white-space: nowrap;
	}
}

/** SWITCHER TABS **/
.row.selection-buttons {
	display: flex;
	text-align: center;
	margin-bottom: 30px;
	justify-content: center;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 500;
	line-height: 20px;
}
.mlpro-pts-lbl-primary {
	color: var(--mlpro-pts-primary-label-color, #000000);
	font-size: var(--mlpro-pts-primary-label-fs, inherit);
}
.mlpro-pts-lbl-secondary {
	color: var(--mlpro-pts-secondary-label-color, #000000);
	font-size: var(--mlpro-pts-secondary-label-fs, inherit);
}
/**** SWITCH ****/
.packageswitch {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 34px;
	margin-bottom: 1px;
}
/** HIDE THE DEFAULT HTML CHECKBOX **/
.packageswitch input {
	opacity: 0;
	width: 0;
	height: 0;
}
/**** SLIDER ****/
.packageslider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--mlpro-pts-track, #000000);
	-webkit-transition: 0.4s;
	transition: 0.4s;
	border-radius: 50px;
}
/** SWITCHER ICON COLOR **/
.packageslider:before {
	position: absolute;
	content: "";
	height: 26px;
	width: 26px;
	left: 4px;
	bottom: 4px;
	background: var(--mlpro-pts-thumb, #ffffff);
	-webkit-transition: 0.4s;
	transition: 0.4s;
	border-radius: 50%;
}
/** ACTIVE SWITCHER **/
input:checked + .packageslider {
	background: var(--mlpro-pts-track-active, var(--accent));
}
input:focus + .packageslider {
	box-shadow: 0 0 1px var(--canvas-black);
}
input:checked + .packageslider:before {
	-webkit-transform: translateX(26px);
	-ms-transform: translateX(26px);
	transform: translateX(26px);
}

/**** SECONDARY TIER SUPPLEMENTAL TEXT ****/
.mlpro-pts-secondary-supplement,
.mlpro-pts-annual-label {
	color: var(--mlpro-pts-secondary-supplement, var(--mlpro-pts-annual-label, var(--accent)));
	font-size: var(--mlpro-pts-secondary-supplement-fs, var(--mlpro-pts-annual-label-fs, 1rem));
	margin-left: 0.15em;
}
