/* Tour Grid & Filters – στυλ (όλα αλλάζουν και από τα Style controls του Elementor) */

/* =====================================================================
 * GRID
 * ===================================================================== */
.tgf-grid { position: relative; }
.tgf-items {
	display: grid;
	grid-template-columns: repeat(var(--tgf-cols, 3), minmax(0, 1fr));
	gap: var(--tgf-gap, 24px);
}
.tgf-item { min-width: 0; }
.tgf-nothing { grid-column: 1 / -1; padding: 40px 0; text-align: center; opacity: .75; }
.tgf-count { margin-bottom: 16px; opacity: .8; }

.tgf-grid.is-loading .tgf-items { opacity: .4; pointer-events: none; transition: opacity .2s; }
.tgf-loader {
	display: none; position: absolute; left: 50%; top: 80px; width: 38px; height: 38px; margin-left: -19px;
	border: 3px solid rgba(0, 0, 0, .12); border-top-color: currentColor; border-radius: 50%;
	animation: tgf-spin .8s linear infinite; z-index: 2;
}
.tgf-grid.is-loading .tgf-loader { display: block; }
@keyframes tgf-spin { to { transform: rotate(360deg); } }

/* Απλή κάρτα (όταν δεν υπάρχει Loop Template) */
.tgf-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.tgf-card-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.tgf-card-title { margin: 0; font-size: 1.15em; }
.tgf-card-title a { color: inherit; text-decoration: none; }

/* Pagination */
.tgf-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 36px; }
.tgf-page {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid rgba(0, 0, 0, .12); border-radius: 10px; text-decoration: none; color: inherit; line-height: 1;
	transition: background-color .15s, color .15s, border-color .15s;
}
a.tgf-page:hover { border-color: #111; }
.tgf-page.is-current { background: #111; color: #fff; border-color: #111; }
.tgf-page.tgf-dots { border-color: transparent; }
.tgf-load-more {
	padding: 13px 30px; border: 0; border-radius: 999px; background: #111; color: #fff; cursor: pointer; font: inherit;
	transition: transform .15s, opacity .15s;
}
.tgf-load-more:hover { opacity: .9; transform: translateY(-1px); }
.tgf-pagination-infinite .tgf-load-more { display: none; }
.tgf-sentinel { width: 100%; height: 1px; }

/* =====================================================================
 * FILTERS
 * ===================================================================== */
.tgf-filters {
	--tgf-accent: #0f766e;
	--tgf-text: #1f2937;
	--tgf-muted: #6b7280;
	--tgf-border: #e5e7eb;
	--tgf-field-bg: #fff;
	--tgf-hover: #f3f4f6;
	--tgf-panel-bg: #fff;
	--tgf-panel-radius: 16px;
	--tgf-radius: 10px;
	--tgf-h: 44px;
	--tgf-accent-soft: rgba(15, 118, 110, .12);

	display: flex; flex-direction: column; gap: 22px;
	color: var(--tgf-text);
	font-size: 15px;
	line-height: 1.4;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	.tgf-filters { --tgf-accent-soft: color-mix(in srgb, var(--tgf-accent) 14%, transparent); }
}
.tgf-filters *, .tgf-filters *::before, .tgf-filters *::after { box-sizing: border-box; }

/* Πλαίσιο */
.tgf-filters.tgf-panel {
	background: var(--tgf-panel-bg);
	border: 1px solid var(--tgf-border);
	border-radius: var(--tgf-panel-radius);
	padding: 24px;
}
.tgf-shadow-yes .tgf-filters.tgf-panel { box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06); }

/* Κάθετη διάταξη: διαχωριστικές γραμμές */
.tgf-layout-vertical .tgf-filter + .tgf-filter { border-top: 1px solid var(--tgf-border); padding-top: 22px; }

/* Οριζόντια διάταξη: μπάρα */
.tgf-filters.tgf-layout-horizontal { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.tgf-layout-horizontal .tgf-filter { flex: 1 1 200px; min-width: 0; }
.tgf-layout-horizontal .tgf-filter-range,
.tgf-layout-horizontal .tgf-filter-date_range { flex-basis: 300px; }
.tgf-layout-horizontal .tgf-filter-search { flex-basis: 260px; }

/* Τίτλος φίλτρου */
.tgf-filter-label {
	margin-bottom: 10px;
	font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--tgf-muted);
}

/* ---------- Πεδία (input / select / date / search) ---------- */
.tgf-filters .tgf-input {
	display: block; width: 100%; height: var(--tgf-h); margin: 0;
	padding: 0 14px;
	font: inherit; color: var(--tgf-text);
	background-color: var(--tgf-field-bg);
	border: 1px solid var(--tgf-border); border-radius: var(--tgf-radius);
	box-shadow: none; outline: none;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none; appearance: none;
}
.tgf-filters .tgf-input:hover { border-color: #cbd0d6; }
.tgf-filters .tgf-input:focus { border-color: var(--tgf-accent); box-shadow: 0 0 0 3px var(--tgf-accent-soft); }
.tgf-filters .tgf-input::placeholder { color: #9ca3af; }

/* Dropdown με βελάκι */
.tgf-filters select.tgf-input {
	padding-right: 40px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}

/* Αναζήτηση με φακό */
.tgf-filters .tgf-search {
	padding-left: 42px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='9' cy='9' r='5.5' fill='none' stroke='%239ca3af' stroke-width='1.8'/%3E%3Cpath d='M13.2 13.2L17 17' stroke='%239ca3af' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: 14px center; background-size: 18px;
}
.tgf-filters .tgf-search::-webkit-search-cancel-button { cursor: pointer; }

/* Ημερομηνίες */
.tgf-filters input[type="date"].tgf-input { padding-right: 10px; }
.tgf-filters input[type="date"].tgf-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.tgf-filters input[type="date"].tgf-input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* Αριθμοί: χωρίς βελάκια */
.tgf-filters input[type="number"].tgf-input { -moz-appearance: textfield; }
.tgf-filters input[type="number"].tgf-input::-webkit-outer-spin-button,
.tgf-filters input[type="number"].tgf-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Από – Έως */
.tgf-range, .tgf-dates { display: flex; flex-wrap: wrap; gap: 10px; }
.tgf-input-wrap { display: flex; flex-direction: column; gap: 6px; flex: 1 1 140px; min-width: 0; margin: 0; }
.tgf-input-label { font-size: .82em; color: var(--tgf-muted); }

.tgf-filters .tgf-range[hidden] { display: none; }

/* ---------- Slider εύρους (δύο λαβές) ---------- */
.tgf-slider {
	--a: 0; --b: 1; --thumb: 22px;
	position: relative; height: var(--thumb); margin: 6px 0 4px;
}
.tgf-slider-track {
	position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px;
	background: var(--tgf-border); border-radius: 999px;
}
.tgf-slider-fill {
	position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--tgf-accent);
	left: calc(var(--thumb) / 2 + var(--a) * (100% - var(--thumb)));
	right: calc(var(--thumb) / 2 + (1 - var(--b)) * (100% - var(--thumb)));
}
.tgf-filters .tgf-slider input[type="range"] {
	-webkit-appearance: none; appearance: none;
	position: absolute; left: 0; top: 0; width: 100%; height: var(--thumb);
	margin: 0; padding: 0; border: 0; background: none; outline: none; box-shadow: none;
	pointer-events: none; /* μόνο οι λαβές πιάνονται */
}
.tgf-filters .tgf-slider input[type="range"]::-webkit-slider-runnable-track { height: var(--thumb); background: none; border: 0; }
.tgf-filters .tgf-slider input[type="range"]::-moz-range-track { height: var(--thumb); background: none; border: 0; }
.tgf-filters .tgf-slider input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; pointer-events: auto;
	width: var(--thumb); height: var(--thumb); border-radius: 50%;
	background: #fff; border: 2px solid var(--tgf-accent);
	box-shadow: 0 1px 3px rgba(16, 24, 40, .2); cursor: grab;
	transition: transform .12s, box-shadow .12s;
}
.tgf-filters .tgf-slider input[type="range"]::-moz-range-thumb {
	pointer-events: auto; box-sizing: border-box;
	width: var(--thumb); height: var(--thumb); border-radius: 50%;
	background: #fff; border: 2px solid var(--tgf-accent);
	box-shadow: 0 1px 3px rgba(16, 24, 40, .2); cursor: grab;
	transition: transform .12s, box-shadow .12s;
}
.tgf-filters .tgf-slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.12); }
.tgf-filters .tgf-slider input[type="range"]:active::-moz-range-thumb { cursor: grabbing; transform: scale(1.12); }
.tgf-filters .tgf-slider input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--tgf-accent-soft); }
.tgf-filters .tgf-slider input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--tgf-accent-soft); }

.tgf-slider-values {
	display: flex; justify-content: space-between; gap: 10px; margin-top: 8px;
	font-size: .9em; font-weight: 600; font-variant-numeric: tabular-nums;
}
.tgf-range-ui-both .tgf-range { margin-top: 14px; }

/* ---------- Checkbox / Radio ---------- */
.tgf-options { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; }
.tgf-option {
	display: flex; align-items: center; gap: 10px;
	margin: 0; padding: 7px 8px;
	border-radius: 8px; cursor: pointer; user-select: none;
	transition: background-color .12s;
}
.tgf-option:hover { background: var(--tgf-hover); }
.tgf-option span { flex: 1 1 auto; }

.tgf-filters .tgf-option input {
	-webkit-appearance: none; appearance: none;
	flex: 0 0 auto; width: 18px; height: 18px; margin: 0;
	border: 1.5px solid #c4c9d0; background: #fff;
	display: inline-grid; place-content: center;
	cursor: pointer; transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.tgf-filters .tgf-option input[type="checkbox"] { border-radius: 5px; }
.tgf-filters .tgf-option input[type="radio"] { border-radius: 50%; }
.tgf-filters .tgf-option input:hover { border-color: var(--tgf-accent); }
.tgf-filters .tgf-option input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tgf-accent-soft); }

.tgf-filters .tgf-option input[type="checkbox"]:checked {
	background: var(--tgf-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 13px no-repeat;
	border-color: var(--tgf-accent);
}
.tgf-filters .tgf-option input[type="radio"]:checked {
	border-color: var(--tgf-accent);
	box-shadow: inset 0 0 0 4px #fff;
	background: var(--tgf-accent);
}
.tgf-option:has(input:checked) span { font-weight: 600; }

.tgf-depth-1 { padding-left: 30px; }
.tgf-depth-2 { padding-left: 52px; }
.tgf-depth-3 { padding-left: 74px; }

/* Οριζόντια διάταξη: οι επιλογές γίνονται «chips» */
.tgf-layout-horizontal .tgf-options { flex-direction: row; flex-wrap: wrap; gap: 8px; max-height: none; overflow: visible; margin: 0; padding: 0; }
.tgf-layout-horizontal .tgf-option {
	padding: 0 14px; height: 38px;
	border: 1px solid var(--tgf-border); border-radius: 999px; background: var(--tgf-field-bg);
	transition: border-color .12s, background-color .12s, color .12s;
}
.tgf-layout-horizontal .tgf-option:hover { border-color: var(--tgf-accent); background: var(--tgf-field-bg); }
.tgf-layout-horizontal .tgf-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tgf-layout-horizontal .tgf-option:has(input:checked) { background: var(--tgf-accent); border-color: var(--tgf-accent); color: #fff; }
.tgf-layout-horizontal .tgf-option:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--tgf-accent-soft); }
.tgf-layout-horizontal .tgf-option span { font-weight: 500; }
.tgf-layout-horizontal [class*="tgf-depth-"] { padding-left: 14px; }

/* ---------- Κουμπί καθαρισμού ---------- */
.tgf-filters .tgf-reset {
	display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
	margin: 0; padding: 8px 14px;
	font: inherit; font-size: .9em; font-weight: 600; line-height: 1;
	color: var(--tgf-accent); background: var(--tgf-accent-soft);
	border: 0; border-radius: 999px; cursor: pointer;
	transition: background-color .15s, color .15s;
}
.tgf-filters .tgf-reset::before { content: "\00d7"; font-size: 1.35em; line-height: .7; }
.tgf-filters .tgf-reset:hover { background: var(--tgf-accent); color: #fff; }
.tgf-filters .tgf-reset[hidden] { display: none; }
.tgf-layout-horizontal .tgf-reset { align-self: flex-end; height: 38px; padding: 0 18px; }

/* ---------- Κινητά ---------- */
@media (max-width: 767px) {
	.tgf-filters.tgf-panel { padding: 18px; }
	.tgf-filters.tgf-layout-horizontal { flex-direction: column; align-items: stretch; }
	.tgf-layout-horizontal .tgf-filter { flex-basis: auto; }
	.tgf-layout-horizontal .tgf-reset { align-self: flex-start; }
}
