/* /lng-price/ filters: give the Day filter and the "Whole month" button the look of the select filters. */

.jet-date-period[data-query-id="lng-table-price"] {
	--btsg-border: 1px solid #ccc;
	--btsg-bg: #fafafa;
	--btsg-color: #666;
	--btsg-height: 44px;
}

.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__wrapper {
	display: flex;
	align-items: stretch;
	gap: 0;
}

/* Date box (empty state button and selected date) */
.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker-button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	box-sizing: border-box;
	min-width: 180px;
	height: var(--btsg-height);
	padding: 10px 15px;
	border: var(--btsg-border);
	border-radius: 0;
	background: var(--btsg-bg);
	color: var(--btsg-color);
	font-family: inherit;
	font-size: 17px;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

/* The date picker positions itself (vertically) from this hidden input, so make it cover the Day box. */
.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker {
	position: relative;
}

.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
}

/* One box like a select: no prev/next day buttons, a select-style chevron in both empty and selected states. */
.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__prev,
.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__next,
.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker-button svg {
	display: none;
}

.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker-button::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}

/* Same font for every filter control */
.jet-select[data-query-id="lng-table-price"] .jet-select__control {
	font-family: inherit;
}

/* "Whole month" button next to the Day filter (selectors beat the theme/Elementor button styles) */
.jet-smart-filters-date-period button.btsg-lng-whole-month {
	box-sizing: border-box;
	height: 44px;
	margin-left: 10px;
	padding: 10px 15px;
	border: 1px solid #35a66a;
	border-radius: 0;
	background: #fff;
	color: #35a66a;
	font-family: inherit;
	font-size: 17px;
	font-weight: normal;
	line-height: 1;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
}

.jet-smart-filters-date-period button.btsg-lng-whole-month:hover,
.jet-smart-filters-date-period button.btsg-lng-whole-month:focus-visible {
	background: #35a66a;
	color: #fff;
}

.jet-smart-filters-date-period button.btsg-lng-whole-month[hidden] {
	display: none;
}

.jet-smart-filters-date-period:has(.jet-date-period[data-query-id="lng-table-price"]) {
	display: flex;
	align-items: center;
}

@media (max-width: 1024px) {
	.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker-button {
		min-width: 130px;
		font-size: 15px;
	}
	.jet-smart-filters-date-period button.btsg-lng-whole-month {
		font-size: 15px;
	}
}

/* Mobile: the Day row takes the full width (widget width set by `wp btsg-lng setup`); the date box absorbs the free space. */
@media (max-width: 767px) {
	.jet-smart-filters-date-period:has(.jet-date-period[data-query-id="lng-table-price"]) {
		width: 100%;
	}
	.jet-date-period[data-query-id="lng-table-price"] {
		flex: 1;
		min-width: 0;
	}
	.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker {
		flex: 1;
		min-width: 0;
	}
	.jet-date-period[data-query-id="lng-table-price"] .jet-date-period__datepicker-button {
		min-width: 0;
		width: 100%;
	}
}

/* Pagination: square boxes like the filters, green current page, compact on mobile. */
.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__item {
	display: block;
	text-decoration: none;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__link,
.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fafafa;
	color: #666;
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	transition: background-color .15s, border-color .15s, color .15s;
}

/* Arrows drawn with borders so they sit centred regardless of the font. */
.jet-smart-filters-pagination[data-query-id="lng-table-price"] .prev-next .jet-filters-pagination__link {
	font-size: 0;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .prev-next .jet-filters-pagination__link::before {
	content: "";
	width: 8px;
	height: 8px;
	border-bottom: 2px solid currentColor;
	border-left: 2px solid currentColor;
	transform: translateX(2px) rotate(45deg);
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .next .jet-filters-pagination__link::before {
	transform: translateX(-2px) rotate(-135deg);
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] a.jet-filters-pagination__item:hover .jet-filters-pagination__link,
.jet-smart-filters-pagination[data-query-id="lng-table-price"] a.jet-filters-pagination__item:focus-visible .jet-filters-pagination__link {
	border-color: #35a66a;
	background: #fff;
	color: #35a66a;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__current .jet-filters-pagination__link {
	border-color: #35a66a;
	background: #35a66a;
	color: #fff;
	font-weight: 600;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__disabled .jet-filters-pagination__link,
.jet-smart-filters-pagination[data-query-id="lng-table-price"] .btsg-lng-disabled .jet-filters-pagination__link {
	opacity: .4;
	cursor: default;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] a.jet-filters-pagination__item.btsg-lng-disabled:hover .jet-filters-pagination__link,
.jet-smart-filters-pagination[data-query-id="lng-table-price"] a.jet-filters-pagination__item.btsg-lng-disabled:focus .jet-filters-pagination__link {
	border-color: #ccc;
	background: #fafafa;
	color: #666;
}

.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__dots {
	min-width: 24px;
	padding: 0;
	border-color: transparent;
	background: none;
}

.btsg-lng-page-status {
	margin-top: 10px;
	color: #888;
	font-size: 14px;
	text-align: center;
}

@media (max-width: 767px) {
	.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination {
		gap: 4px;
	}
	.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__link,
	.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__dots {
		min-width: 34px;
		height: 36px;
		padding: 0 6px;
		font-size: 15px;
	}
	.jet-smart-filters-pagination[data-query-id="lng-table-price"] .jet-filters-pagination__dots {
		min-width: 16px;
		padding: 0;
	}
}
