/**
 * Jannah Rates Table — structural styles only.
 *
 * Everything a person can change from the panel (padding, widths, colours,
 * alignment, divider widths) comes from Elementor's generated CSS, not from
 * here. This file holds only the rules that make a table a table, so that the
 * panel controls always win.
 *
 * These rules used to be printed inside render() as a <style> block with no
 * {{WRAPPER}} on any selector, which meant every rates table on a page was
 * styling every other one.
 *
 * @package Jannah_Widgets
 */

.rtw-table-wrap {
	width: 100%;
}

/* Only added when "Scroll Instead of Squashing" is on. */
.rtw-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.rtw-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.rtw-table th,
.rtw-table td {
	border-bottom-style: solid;
	word-break: break-word;
}

.rtw-table th.rtw-has-right-border,
.rtw-table td.rtw-has-right-border {
	border-right-style: solid;
}

/**
 * "Show Bottom Border on Last Row" switched off.
 *
 * The !important is load-bearing and stays. The divider width control writes
 * border-bottom-width through an Elementor selector, and {{WRAPPER}} alone is
 * three classes before .rtw-table is even counted — (0,4,2) against the (0,3,3)
 * this rule can reach. Without !important the divider width wins and the last
 * row keeps its border.
 *
 * The difference from the old version is scope, which was the actual bug: this
 * needs the .rtw-hide-last-border class, so it can only ever affect a table
 * whose own setting asked for it. The old rule was printed unscoped into the
 * page, so one table with the switch off stripped the last-row border from
 * every other rates table on the same page.
 */
.rtw-table.rtw-hide-last-border tbody tr:last-child td {
	border-bottom-width: 0 !important;
}
