/* ==========================================================================
   AFP membership comparison table  (salient-child)

   Matches the pricing / benefits table on
   https://www.theafp.co.uk/member-benefits-fleet-support-providers/

   Everything is scoped under the "comparison" wrapper class, so no other
   table on the site is affected:

     <div class="comparison">
       <table>
         <thead><tr><th class="product"></th><th class="product">…</th>…</tr></thead>
         <tbody class="all-outline-main">
           <tr><td colspan="3">label</td></tr>          ← hidden (odd rows)
           <tr class="compare-row"><td>label</td><td>…</td>…</tr>
           …
         </tbody>
       </table>
     </div>

   Values are taken from the live site's stylesheets (old "theafp" theme:
   style.css + custom-designer.css), with !important used where Salient's
   own table styles would otherwise win.
   ========================================================================== */

.comparison {
	--afp-cmp-text: #3c4547;
	--afp-cmp-line: #e8e8e8;
	--afp-cmp-dash: #bababa;
	--afp-cmp-row: #f1f1f1;
	--afp-cmp-outline: #cbc9ca;
	--afp-cmp-platinum: #e0dfdf;
	--afp-cmp-gold: #f0e19e;
	--afp-cmp-silver: #cbc9ca;

	display: inline-block;
	width: 100%;
	text-align: center;
	font-family: "Poppins", sans-serif;
}

.comparison *,
.comparison *::before,
.comparison *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ table */
.comparison table {
	width: 100%;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: auto;
	background: transparent !important;
}

.comparison table td,
.comparison table th {
	empty-cells: show;
	padding: 10px;
	border-top: 1px solid var(--afp-cmp-line) !important;
	border-bottom: 1px solid var(--afp-cmp-line) !important;
	border-left: 0 !important;
	color: var(--afp-cmp-text);
	font-size: 15px;
	line-height: 1.5;
	vertical-align: middle;
	text-align: center;
	background-color: transparent;
}

/* Body cells: dashed column dividers, capitalised labels. */
.comparison table td {
	position: relative;
	z-index: 1; /* above the rounded outline below (live site used 999999, which would sit over Salient's fixed header) */
	width: 200px;
	color: var(--afp-cmp-text) !important;
	font-size: 18px !important;
	text-transform: capitalize;
	border-right: 1.8px dashed var(--afp-cmp-dash) !important;
}

.comparison table td:last-child {
	border-right: 0 !important;
}

/* Rounded top-left corner cell (its inline style asks for no top border). */
.comparison table td.cut-border {
	border-top: 0 !important;
}

/* Label column. */
.comparison table tr td:first-child {
	padding: 15px;
	font-weight: 600;
	text-align: center;
}

/* Every odd body row is the "mobile heading" copy of the label — the live
   site keeps these hidden at all sizes. */
.comparison table tbody tr:nth-child(2n+1) {
	display: none;
}

/* Zebra rows. */
.comparison table .compare-row,
.comparison table .compare-row td {
	background-color: var(--afp-cmp-row);
}

/* Rounded grey outline around the whole body. */
.comparison .all-outline-main {
	position: relative;
	width: 100%;
	height: 100%;
}

.comparison .all-outline-main::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	border: 2px solid var(--afp-cmp-outline);
	border-radius: 35px 0 35px 35px;
	pointer-events: none;
}

/* --------------------------------------------------------- header cells */
.comparison table th {
	padding: 0;
	font-weight: 400;
	border-top: 0 !important;
	border-bottom: 0 !important;
	border-right: 0 !important;
}

.comparison table th.product {
	height: 40px;
	padding: 30px 35px 22px;
	color: #fff;
	font-size: 24px;
	line-height: 36px;
	text-align: center;
	text-transform: capitalize;
	border-top-left-radius: 24px;
	border-top-right-radius: 24px;
}

.comparison table th.product:nth-child(2) {
	background-color: var(--afp-cmp-platinum);
}

.comparison table th.product:nth-child(3) {
	background-color: var(--afp-cmp-gold);
}

.comparison table th.product:nth-child(4) {
	background-color: var(--afp-cmp-silver);
}

.comparison table th.product h5 {
	margin: 0;
	padding: 0;
	color: var(--afp-cmp-text);
	font-family: "Poppins", sans-serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 36px;
	text-transform: capitalize;
}

/* "Join Now" buttons. */
.comparison .cmn-btn.membership-button-more {
	display: flex;
	justify-content: center;
	width: 145px;
	margin: 10px auto;
	padding: 3px 15px;
	border: 2px solid #fff;
	border-radius: 0;
	background-color: transparent;
	color: var(--afp-cmp-text);
	font-family: "Poppins", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.5s ease;
}

.comparison .cmn-btn.membership-button-more.outline-cg-diff {
	border-color: #aeaaab;
}

.comparison .cmn-btn.membership-button-more:hover,
.comparison .cmn-btn.membership-button-more:focus-visible {
	background-color: var(--afp-cmp-text);
	border-color: var(--afp-cmp-text);
	color: #fff;
}

/* Tick icons, if any cells use <i class="fa fa-check">. */
.comparison i.fa.fa-check {
	padding: 5px;
	border-radius: 80px;
	background-color: #57b197;
	color: #fff;
	font-size: 13px;
	font-weight: normal;
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 1200px) {
	.comparison {
		min-height: 0.01%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media (max-width: 991px) {
	.comparison table th.product {
		padding: 20px 5px 22px;
	}
	.comparison .cmn-btn.membership-button-more {
		font-size: 13px;
	}
}

@media (max-width: 767px) {
	.comparison table td {
		font-size: 13px !important;
	}
	.comparison table tr td:first-child {
		min-width: 180px;
	}
	.comparison table th.product {
		padding: 25px 40px 22px;
	}
	.comparison table th.product h5 {
		font-size: 20px;
		line-height: 25px;
	}
	.comparison .cmn-btn.membership-button-more {
		padding: 3px 5px;
		font-size: 12px;
	}
	.comparison .all-outline-main::before {
		display: none;
	}
}
