.jcdt-rates-table {
	--jcdt-rates-header-bg: #e8eef0;
	--jcdt-rates-header-text: #1d2327;
	--jcdt-rates-border: #d7dee2;
	--jcdt-rates-button-bg: #006d73;
	--jcdt-rates-button-text: #ffffff;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	color: #17242a;
	font-family: inherit;
}

.jcdt-rates-table *,
.jcdt-rates-table *::before,
.jcdt-rates-table *::after {
	box-sizing: border-box;
}

/* Elementor compatibility: the shortcode widget itself must be allowed to shrink. */
.elementor-widget-shortcode:has(.jcdt-rates-table),
.elementor-widget-shortcode:has(.jcdt-rates-table) > .elementor-widget-container {
	min-width: 0;
	max-width: 100%;
}

.jcdt-rates-table__desktop,
.jcdt-rates-table__scroll {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.jcdt-rates-table__desktop {
	display: block;
}

.jcdt-rates-table__mobile {
	display: none;
}

.jcdt-rates-table__scroll {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-inline: contain;
	border: 1px solid var(--jcdt-rates-border);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 10px 30px rgba(19, 44, 52, 0.055);
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 109, 115, 0.38) transparent;
}

.jcdt-rates-table__scroll::-webkit-scrollbar {
	height: 8px;
}

.jcdt-rates-table__scroll::-webkit-scrollbar-track {
	background: transparent;
}

.jcdt-rates-table__scroll::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(0, 109, 115, 0.30);
}

.jcdt-rates-table__table {
	width: 100%;
	min-width: 840px;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	background: #ffffff;
}

.jcdt-rates-table__table th,
.jcdt-rates-table__table td {
	text-align: left;
	vertical-align: middle;
}

.jcdt-rates-table__table th {
	padding: 18px 20px;
	border: 0;
	border-right: 1px solid var(--jcdt-rates-border);
	border-bottom: 1px solid var(--jcdt-rates-border);
	background: var(--jcdt-rates-header-bg);
	color: var(--jcdt-rates-header-text);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.045em;
	text-transform: uppercase;
}

.jcdt-rates-table__table th:last-child {
	border-right: 0;
}

.jcdt-rates-table__table td {
	padding: 21px 20px;
	border: 0;
	border-right: 1px solid var(--jcdt-rates-border);
	border-bottom: 1px solid var(--jcdt-rates-border);
	font-size: 15.5px;
	line-height: 1.45;
	color: #27363c;
	overflow-wrap: anywhere;
	transition: background-color 0.18s ease;
}

.jcdt-rates-table__table td:last-child {
	border-right: 0;
}

.jcdt-rates-table__table tbody tr:last-child td {
	border-bottom: 0;
}

.jcdt-rates-table__table tbody tr:nth-child(even) td {
	background: #fbfcfc;
}

.jcdt-rates-table__table tbody tr:hover td {
	background: #f5f9f9;
}

.jcdt-rates-table__table td strong,
.jcdt-rates-table__card-value strong {
	font-weight: 800;
	color: #1f2c31;
}

.jcdt-rates-table__action-heading,
.jcdt-rates-table__action-cell {
	white-space: nowrap;
}

.jcdt-rates-table__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 112px;
	min-height: 42px;
	padding: 0 17px;
	border: 0;
	border-radius: 999px;
	background: var(--jcdt-rates-button-bg);
	color: var(--jcdt-rates-button-text) !important;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 5px 14px rgba(0, 109, 115, 0.12);
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.jcdt-rates-table__button:hover,
.jcdt-rates-table__button:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 109, 115, 0.18);
	opacity: 0.96;
}

.jcdt-rates-table__button:focus-visible {
	outline: 3px solid rgba(0, 109, 115, 0.22);
	outline-offset: 3px;
}

.jcdt-rates-table__empty {
	padding: 28px !important;
	text-align: center !important;
	color: #646970;
}

.jcdt-rates-table .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Desktop column layouts. */
.jcdt-rates-table__table .jcdt-rates-table__cell--product { width: 27%; }
.jcdt-rates-table__table .jcdt-rates-table__cell--rate { width: 20%; }
.jcdt-rates-table__table .jcdt-rates-table__cell--secondary { width: 18%; }
.jcdt-rates-table__table .jcdt-rates-table__cell--requirements { width: 19%; }
.jcdt-rates-table__table .jcdt-rates-table__cell--action { width: 16%; }

.jcdt-rates-table--cols-3 .jcdt-rates-table__table { min-width: 620px; }
.jcdt-rates-table--cols-3 .jcdt-rates-table__cell--product { width: 40%; }
.jcdt-rates-table--cols-3 .jcdt-rates-table__cell--rate { width: 35%; }
.jcdt-rates-table--cols-3 .jcdt-rates-table__cell--secondary { width: 25%; }

.jcdt-rates-table--cols-4 .jcdt-rates-table__table { min-width: 720px; }
.jcdt-rates-table--cols-4 .jcdt-rates-table__cell--product { width: 31%; }
.jcdt-rates-table--cols-4 .jcdt-rates-table__cell--rate { width: 24%; }
.jcdt-rates-table--cols-4 .jcdt-rates-table__cell--secondary { width: 21%; }
.jcdt-rates-table--cols-4 .jcdt-rates-table__cell--requirements,
.jcdt-rates-table--cols-4 .jcdt-rates-table__cell--action { width: 24%; }

@media (max-width: 1024px) {
	.jcdt-rates-table__table th {
		padding: 16px;
	}

	.jcdt-rates-table__table td {
		padding: 18px 16px;
		font-size: 15px;
	}

	.jcdt-rates-table__button {
		min-width: 102px;
		padding-inline: 14px;
	}
}

/*
 * Mobile uses dedicated card markup instead of re-flowing <table> elements.
 * This avoids intrinsic table widths, clipping and Elementor flex overflow.
 */
@media (max-width: 767px) {
	.elementor-widget-shortcode:has(.jcdt-rates-table),
	.elementor-widget-shortcode:has(.jcdt-rates-table) > .elementor-widget-container,
	.jcdt-rates-table {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.jcdt-rates-table__desktop {
		display: none !important;
	}

	.jcdt-rates-table__mobile {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.jcdt-rates-table__card {
		display: block;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin: 0;
		border: 1px solid var(--jcdt-rates-border);
		border-radius: 14px;
		overflow: hidden;
		background: #ffffff;
		box-shadow: 0 7px 20px rgba(19, 44, 52, 0.045);
	}

	.jcdt-rates-table__card-field {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 5px;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		padding: 14px 16px;
		border-bottom: 1px solid var(--jcdt-rates-border);
	}

	.jcdt-rates-table__card-field:last-child {
		border-bottom: 0;
	}

	.jcdt-rates-table__card-label {
		display: block;
		max-width: 100%;
		font-size: 10.5px;
		font-weight: 800;
		line-height: 1.35;
		letter-spacing: 0.03em;
		text-transform: uppercase;
		color: #536169;
	}

	.jcdt-rates-table__card-value {
		display: block;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		font-size: 14.5px;
		line-height: 1.45;
		color: #27363c;
		overflow-wrap: anywhere;
		word-break: normal;
	}

	.jcdt-rates-table__card-field--action {
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.jcdt-rates-table__button--mobile {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		min-height: 44px;
		padding: 11px 16px;
		white-space: normal;
	}

	.jcdt-rates-table__mobile-empty {
		width: 100%;
		padding: 22px 18px;
		border: 1px solid var(--jcdt-rates-border);
		border-radius: 14px;
		background: #ffffff;
		text-align: center;
		color: #646970;
	}
}

@media (max-width: 380px) {
	.jcdt-rates-table__mobile {
		gap: 12px;
	}

	.jcdt-rates-table__card-field {
		padding: 13px 14px;
	}

	.jcdt-rates-table__card-value {
		font-size: 14px;
	}
}
