/**
 * Pricing Table Widget — greyscale defaults.
 *
 * Editors override every colour from the widget's Style tab. The selectors
 * here are written so Elementor's injected styles (which carry an extra
 * .elementor-{id} prefix) always win on specificity.
 */

.pricing-table-widget {
	margin: 0 0 1.5rem;
	box-sizing: border-box;
}
.pricing-table-widget *,
.pricing-table-widget *::before,
.pricing-table-widget *::after {
	box-sizing: border-box;
}

/* =====================================================
   Shared bits
   ===================================================== */
.pricing-table-widget .reg-btn {
	display: inline-block;
	padding: 10px 22px;
	background: #1a1a1a;
	color: #ffffff;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	border: 0;
	border-radius: 2px;
	transition: background-color .2s ease, color .2s ease;
}
.pricing-table-widget .reg-btn:hover,
.pricing-table-widget .reg-btn:focus {
	background: #3a3835;
	color: #ffffff;
	text-decoration: none;
}

/* Hide the button by default; states reveal it. */
.pricing-table-widget tbody td .reg-btn,
.pricing-table-widget .ptw-row .reg-btn {
	display: none;
}
.pricing-table-widget tbody td.active .reg-btn,
.pricing-table-widget .ptw-row.active .reg-btn {
	display: inline-block;
	margin-top: 14px;
}

/* =====================================================
   Layout 1 — Table (columns)
   ===================================================== */
.pricing-table-widget--table .pricing-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	background: #ffffff;
	border: 1px solid #d9d6d2;
}

.pricing-table-widget--table caption {
	caption-side: top;
	background: #1a1a1a;
	color: #ffffff;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 16px 22px;
	text-align: center;
}

.pricing-table-widget--table thead th {
	background: #f3f1ee;
	padding: 14px 12px 12px;
	text-align: center;
	font-weight: 600;
	color: #2a2825;
	border-right: 1px solid #d9d6d2;
	border-bottom: 1px solid #d9d6d2;
	vertical-align: top;
	line-height: 1.3;
}
.pricing-table-widget--table thead th:last-child { border-right: 0; }

.pricing-table-widget--table thead th .ptw-name {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: inherit;
}
.pricing-table-widget--table thead th .ptw-dates {
	display: block;
	font-size: 11px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	margin-top: 5px;
	opacity: .65;
}

.pricing-table-widget--table tbody td {
	padding: 22px 12px;
	text-align: center;
	font-weight: 600;
	border-right: 1px solid #d9d6d2;
	color: #1a1a1a;
	background: #ffffff;
	vertical-align: middle;
}
.pricing-table-widget--table tbody td:last-child { border-right: 0; }

.pricing-table-widget--table .ptw-price {
	display: block;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -.01em;
}

/* States — table layout */
.pricing-table-widget--table thead th.active {
	background: #ecebe8;
	color: #0a0a0a;
	border-bottom-color: #1a1a1a;
}
.pricing-table-widget--table tbody td.active {
	background: #ecebe8;
	color: #0a0a0a;
}

.pricing-table-widget--table thead th.expired {
	opacity: .42;
	text-decoration: line-through;
}
.pricing-table-widget--table tbody td.expired {
	background: #f7f6f4;
	color: #b3b0ab;
	text-decoration: line-through;
}

.pricing-table-widget--table thead th.future { opacity: .5; }
.pricing-table-widget--table tbody td.future {
	background: #fafaf9;
	color: #c4c1bc;
}


/* =====================================================
   Layout 2 — Stacked rows
   ===================================================== */
.pricing-table-widget--rows .pricing-rows {
	width: 100%;
	background: #ffffff;
	border: 1px solid #d9d6d2;
}

.pricing-table-widget--rows .ptw-cap {
	background: #1a1a1a;
	color: #ffffff;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 16px 22px;
	text-align: center;
}

.pricing-table-widget--rows .ptw-row {
	display: grid;
	grid-template-columns: 1.4fr 1.4fr 1fr auto;
	gap: 24px;
	align-items: center;
	padding: 22px 26px;
	border-top: 1px solid #d9d6d2;
	background: #ffffff;
	color: #1a1a1a;
}
.pricing-table-widget--rows .ptw-row:first-of-type { border-top: 0; }

.pricing-table-widget--rows .ptw-name {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .12em;
}
.pricing-table-widget--rows .ptw-dates {
	font-size: 13px;
	opacity: .7;
}
.pricing-table-widget--rows .ptw-price {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.01em;
	text-align: right;
}

/* States — rows layout */
.pricing-table-widget--rows .ptw-row.active {
	background: #ecebe8;
	color: #0a0a0a;
}
.pricing-table-widget--rows .ptw-row.expired {
	background: #f7f6f4;
	color: #b3b0ab;
	text-decoration: line-through;
}
.pricing-table-widget--rows .ptw-row.future {
	background: #fafaf9;
	color: #c4c1bc;
}


/* =====================================================
   Mobile
   ===================================================== */
@media (max-width: 760px) {
	/* Caption left-aligned on mobile (per design spec). */
	.pricing-table-widget--table caption,
	.pricing-table-widget--rows .ptw-cap {
		text-align: left;
	}

	/* Table layout becomes horizontally scrollable so columns stay readable. */
	.pricing-table-widget--table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.pricing-table-widget--table .pricing-table {
		min-width: 560px;
		table-layout: auto;
	}
	.pricing-table-widget--table thead th { min-width: 110px; }
	.pricing-table-widget--table tbody td { min-width: 110px; }

	.pricing-table-widget--table thead th .ptw-name { font-size: 11px; }
	.pricing-table-widget--table thead th .ptw-dates { font-size: 10px; }
	.pricing-table-widget--table .ptw-price { font-size: 19px; }

	/* Stacked rows collapse to a two-line layout on small screens. */
	.pricing-table-widget--rows .ptw-row {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"name price"
			"dates dates"
			"btn   btn";
		gap: 10px 16px;
		padding: 18px 20px;
	}
	.pricing-table-widget--rows .ptw-name  { grid-area: name; }
	.pricing-table-widget--rows .ptw-dates { grid-area: dates; }
	.pricing-table-widget--rows .ptw-price {
		grid-area: price;
		text-align: right;
	}
	.pricing-table-widget--rows .ptw-row .reg-btn { grid-area: btn; justify-self: start; }
}
