/**
 * Comparison Table Block - Frontend Styles
 */

/* -------------------------------------------------------------------------
	 Wrapper & scroll container
	 ------------------------------------------------------------------------- */

.wa-comparison-table-wrapper {
	width: 100%;
	position: relative;
}

.wa-comparison-table-wrapper.is-full-width {
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	overflow-x: hidden;
}

.wa-ct-scroll-container {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* -------------------------------------------------------------------------
	 Table base
	 ------------------------------------------------------------------------- */

.wa-comparison-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
/*  table-layout: fixed;*/
	border-radius: 1rem;
	overflow: hidden;
}

.wa-comparison-table th, .wa-comparison-table td {
	border: none;
	width: 40%;
}

.wa-comparison-table th.wa-ct-cell.is-empty-cell, th.wa-ct-cell:first-child {
	width: 20%;
}

.wa-comparison-table[data-column-count="6"] th, .wa-comparison-table[data-column-count="6"] td, .wa-comparison-table[data-column-count="6"] th.wa-ct-cell.is-empty-cell, .wa-comparison-table[data-column-count="6"] th.wa-ct-cell:first-child {
	width: 16.666%;
}

.wa-comparison-table th:not(.is-empty-cell), .wa-comparison-table td:not(.is-empty-cell) {
	background: #fff;
}

/* -------------------------------------------------------------------------
	 Cells
	 ------------------------------------------------------------------------- */

.wa-ct-cell {
	padding: 1.75rem 1rem;
	text-align: center;
	vertical-align: middle;
/*  border-bottom: 1px solid #f0eaf4;*/
	font-size: 1rem;
	color: #000;
	transition: background-color 0.2s ease;
	border-right: .75rem solid #FFFCFA;
}

.wa-ct-cell:not(.is-empty-cell,:last-child,.is-header-cell) {
	border-right: .75rem solid #FFFCFA !important;
}

/* First column — row header */



th.wa-ct-cell:first-child:not(.is-empty-cell) {
	text-align: right;
	font-weight: 700;
	color: #411a50;
	background-color: #FFFCFA;
	border-right: 1px solid #f0eaf4 !important;
}




/* Header row cells */
.is-header-row .wa-ct-cell,
.wa-ct-cell.is-header-cell {
/*  background-color: #411a50;
	color: #ffffff;*/
	font-family: 'Georama', sans-serif;
	font-weight: 700;
	font-size: 1rem;
	border-bottom: none;
}

/* Top-left empty cell in header row */
.is-header-row .wa-ct-cell:first-child,
.wa-ct-cell.is-empty-cell {
	background-color: transparent;
}

/* Last row — remove bottom border */
tbody:last-of-type tr:last-child .wa-ct-cell {
	border-bottom: none;
}

thead th.is-header-cell {
	border-top-left-radius: 1.5rem;
	border-top-right-radius: 1.5rem;
	margin-right: 1rem;
	border-bottom: 1px solid #f0eaf4 !important;
	padding: .75rem;
}
thead th.is-header-cell:not(:last-child) {
	border-right: .75rem solid #fff0e2 !important;
}



/* -------------------------------------------------------------------------
	 Featured column highlight
	 ------------------------------------------------------------------------- */

.wa-ct-cell.is-featured-column {
	background-color: #fdf6ff;
	position: relative;
}

.wa-ct-cell.is-featured-column::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
/*  border-left: 2px solid #850989;
	border-right: 2px solid #850989;*/
	pointer-events: none;
}

.is-header-row .wa-ct-cell.is-featured-column {
/*  background-color: #850989;*/
}

.is-header-row .wa-ct-cell.is-featured-column::before {
	display: none;
}

/* Cap the featured column highlight on the last row */
tbody:last-of-type tr:last-child .wa-ct-cell.is-featured-column::before {
/*  border-bottom: 2px solid #850989;*/
}

/* -------------------------------------------------------------------------
	 Sticky header
	 ------------------------------------------------------------------------- */

.has-sticky-header thead tr {
	position: sticky;
	top: 0;
	z-index: 10;
}

/* Adjust for WP admin bar */
.admin-bar .has-sticky-header thead tr {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .has-sticky-header thead tr {
	  top: 46px;
	}
}

/* -------------------------------------------------------------------------
	 Cell content types
	 ------------------------------------------------------------------------- */

/* Image */
.wa-ct-cell-image {
	max-width: 15rem;
	width: 100%;
	height: auto;
	display: block;
	margin: 1.5rem auto;
	border-radius: 8px;
}

/* Stars */
.wa-ct-stars {
	display: inline-flex;
	gap: 0.15rem;
	font-size: 1.25rem;
	line-height: 1;
}

.wa-ct-star.is-filled {
	color: #FF7E0B;
}

.wa-ct-star.is-empty {
	color: #ddd;
}

/* -------------------------------------------------------------------------
	 Mobile column picker UI
	 ------------------------------------------------------------------------- */

.wa-ct-column-picker {
	display: none; /* shown via JS on mobile */
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background: #411a50;
	color: #ffffff;
	border-radius: 12px 12px 0 0;
	font-family: 'Georama', sans-serif;
	font-weight: 700;
	font-size: 0.95rem;
}

.wa-ct-picker-prev,
.wa-ct-picker-next {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #ffffff;
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	cursor: pointer;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.wa-ct-picker-prev:hover,
.wa-ct-picker-next:hover {
	background-color: rgba(255, 255, 255, 0.15);
}

.wa-ct-picker-prev:disabled,
.wa-ct-picker-next:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.wa-ct-picker-label {
	flex: 1;
	text-align: center;
	padding: 0 0.5rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* -------------------------------------------------------------------------
	 Responsive — column picker mode
	 ------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.wa-comparison-table-wrapper.mobile-column-picker .wa-ct-column-picker {
	  display: flex;
	}

	/* All non-header, non-row-header columns hidden by default;
	   JS adds .is-visible-column to the active data column */
	.wa-comparison-table.mobile-column-picker .wa-ct-cell {
	  display: none;
	}

	/* Always show row header (first column) */
	.wa-comparison-table.mobile-column-picker .wa-ct-cell:first-child {
	  display: table-cell;
	  width: 40%;
	}

	/* JS-controlled: visible data column */
	.wa-comparison-table.mobile-column-picker .wa-ct-cell.is-visible-column {
	  display: table-cell;
	}

	/* Shrink images on mobile */
	.wa-ct-cell-image {
	  max-width: 80px;
	}

	.wa-ct-cell {
	  padding: 1rem 0.75rem;
	  font-size: 0.9rem;
	}
}

/* -------------------------------------------------------------------------
   Scroll mode — break out to right edge only
   ------------------------------------------------------------------------- */

.wa-comparison-table-wrapper.mobile-scroll {
	margin-left: 0 !important;
    margin-right: calc(-1 * var(--bs-gutter-x) * 0.5) !important;
	width: calc( 100% + (var(--bs-gutter-x) * 0.5)) !important;
	padding-right: 0;
}

@media (min-width: 576px) {
	.wa-comparison-table-wrapper.mobile-scroll {
		margin-right: calc(-1 * ((100vw - 540px) / 2 + var(--bs-gutter-x) * 0.5)) !important;
		width: calc( 100% + (((100vw - 540px) / 2 + var(--bs-gutter-x) * 0.5))) !important;
	}
}

@media (min-width: 768px) {
	.wa-comparison-table-wrapper.mobile-scroll {
		margin-right: calc(-1 * ((100vw - 720px) / 2 + var(--bs-gutter-x) * 0.5)) !important;
		width: calc( 100% + (((100vw - 720px) / 2 + var(--bs-gutter-x) * 0.5))) !important;
	}
}

@media (min-width: 992px) {
    .wa-comparison-table-wrapper.mobile-scroll {
    	margin-right: 0 !important;
    	width: 100% !important;
    }
}
/*
@media (min-width: 992px) {
    .wa-comparison-table-wrapper.mobile-scroll {
        margin-right: calc(-1 * ((100vw - 960px) / 2 + var(--bs-gutter-x) * 0.5));
    }
}

@media (min-width: 1200px) {
    .wa-comparison-table-wrapper.mobile-scroll {
        margin-right: calc(-1 * ((100vw - 1140px) / 2 + var(--bs-gutter-x) * 0.5));
    }
}

@media (min-width: 1400px) {
    .wa-comparison-table-wrapper.mobile-scroll {
        margin-right: calc(-1 * ((100vw - 1320px) / 2 + var(--bs-gutter-x) * 0.5));
    }
}
*/