/**
 * Properties Tiles Styles
 *
 * @package TamarackProperties
 */

/* =============================================================================
   TILES VIEW STYLES
   ============================================================================= */


.page-id-6949 .breadcumb-wrapper { display:block; }
.page-id-6949 .breadcumb-wrapper .breadcumb-menu { display:none; }

.tamarack-properties-tiles {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

/* Page Heading - using theme's sec-title class */
.tamarack-properties-tiles .sec-title {
	padding-top: 75px;
}

/* Add padding below property tiles */
.tamarack-properties-tiles .properties-container {
	padding-bottom: 75px;
}

/* Mobile Filter Toggle Button Container */
.mobile-filter-toggle-container {
	display: none;
	width: 100%;
	max-width: 400px;
	margin:0 auto 20px;
	padding: 20px;
	border: 1px solid #D4D9D4;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
	display: inline-block;
	background: #1B6551;
	color: white;
	border: none;
	padding: 12px 24px;
	font-size: 17px;
	font-weight: 400;
	cursor: pointer;
	border-radius: 0;
	white-space: nowrap;
}

.mobile-filter-toggle:hover {
	opacity: 0.9;
}

/* Mobile Filter Close Button */
.mobile-filter-close {
	display: none;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 40px;
	right: 0;
	background: transparent;
	border: 1px solid #667E78;
	cursor: pointer;
	padding: 0;
	width: 50px;
	height: 50px;
	z-index: 1001;
	font-size: 0;
	text-indent: -9999px;
	background-image: url('../images/x-close.svg');
	background-repeat: no-repeat;
	background-size: 75% 75%;
	background-position: center;
}

.mobile-filter-close:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

/* Filter Overlay */
.filter-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.filter-overlay.active {
	display: block;
	opacity: 1;
}

/* Filters */
.properties-filters {
	background: #D4D9D4;
	padding: 25px;
	margin-bottom: 30px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.filters-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.filters-header h3 {
	margin: 0;
	font-size: 28px;
	font-weight: 500;
	color: #070D0A;
}

.filter-actions {
	display: flex;
	align-items: stretch;
	gap: 30px;
}

.view-toggle-buttons {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.view-toggle-btn {
	width: 50px;
	height: 50px;
	padding: 5px;
	background: transparent;
	border: 2px solid #ddd;
	border-radius: 0;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	flex-shrink: 0;
	border:1px solid #1B6551;
}

.view-toggle-btn img {
	width: 100%;
	height: 100%;
}

.view-toggle-btn.active {
	border-color: #1B6551;
	background: #1B6551;
}

.view-toggle-btn.active img {
	filter: brightness(0) invert(1);
}

.clear-filters-btn {
	background: #1B6551;
	color: white;
	border: none;
	padding: 10px 20px;
	cursor: pointer;
	font-size: 17px;
	font-weight: 400;
	border-radius: 0;
	transition: background 0.3s ease;
	height: 50px;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

.clear-filters-btn:hover {
	background: #145241;
}

.filters-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
    gap: 25px;
	margin-bottom: 15px;
	overflow: hidden;
}

.filters-grid > div.filter-group:first-of-type label { display:flex; justify-content: space-between; }

/* Mobile Show Results Button */
.mobile-show-results-container {
	display: none;
	padding: 20px 0 80px 0;
	margin-top: 20px;
}

.mobile-show-results-btn {
	width: auto;
	background: #1B6551;
	color: white;
	border: none;
	padding: 15px 24px;
	font-size: 17px;
	font-weight: 400;
	cursor: pointer;
	border-radius: 0;
	text-align: center;
	white-space: nowrap;
}

.mobile-show-results-btn:hover {
	opacity: 0.9;
}

.filter-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}

.select-decor {
	position: relative;
	width: 100%;
}

.properties-filters .select-decor::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 9px;
	background-image: url('../images/select-arrow-down.svg');
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-position: center;
	pointer-events: none;
}

.filter-group label {
	font-weight: 400;
	margin-bottom: 5px;
	color: #333;
	font-size: 17px;
	text-transform: none;
}

.properties-filters input[type="radio"] ~ label { font-weight:400; }

/* Price range slider styling */
.filter-group input[type="range"] {
	width: 100%;
	height: 18px;
	background: transparent;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
}

.filter-group input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	background: white;
	border: 2px solid #1B6551;
	cursor: pointer;
	border-radius: 50%;
	margin-top: -7px;
	box-sizing: border-box;
}

.filter-group input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: white;
	border: 2px solid #1B6551;
	cursor: pointer;
	border-radius: 50%;
	box-sizing: border-box;
}

.filter-group input[type="range"]::-webkit-slider-runnable-track {
	background: #1B6551;
	height: 3px;
	border-radius: 1.5px;
	width: 100%;
}

.filter-group input[type="range"]::-moz-range-track {
	background: #1B6551;
	height: 3px;
	border-radius: 1.5px;
	width: 100%;
}

.filter-select {
	padding: 10px;
	border: 1px solid #ddd;
	appearance: none;
	background-image: none;
	background: white;
	background-color: white;
	cursor: pointer;
	transition: none;
	font-size: 17px;
	font-weight: 400;
	width: 100%;
	box-sizing: border-box;
	color: inherit;
	border-radius: 0;
}

.filter-select:hover,
.filter-select:focus,
.filter-select:active {
	outline: none;
	border-color: #ddd;
	background: white;
	background-color: white;
	color: inherit;
	border-radius: 0;
}

/* Ensure dropdown options inherit sizing/weight */
.filter-select option {
	font-size: 17px;
	font-weight: 400;
	background: white;
	color: #333;
}

.filter-select option:checked,
.filter-select option:active {
	background: white;
	color: #333;
}

/* Simple green-circle checkboxes and radio buttons (apply to all NON-region checkboxes and beds radios) */
.properties-filters .filter-group input[type="checkbox"]:not([id^="filter-region-"]),
.properties-filters .filter-group input[type="radio"][id^="filter-beds-"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
	-webkit-appearance: none;
	appearance: none;
}

.properties-filters .filter-group input[type="checkbox"]:not([id^="filter-region-"]):not([id^="filter-baths-"]) + label,
.properties-filters .filter-group input[type="radio"][id^="filter-beds-"] + label {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding-left: 32px;
	cursor: pointer;
	margin-right: 12px;
	white-space: nowrap;
}

.properties-filters .filter-group input[type="checkbox"]:not([id^="filter-region-"]) + label::before,
.properties-filters .filter-group input[type="radio"][id^="filter-beds-"] + label::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	display: inline-block;
	box-sizing: border-box;
	transition: none;
}

.properties-filters .filter-group input[type="checkbox"]:not([id^="filter-region-"]):checked + label::before,
.properties-filters .filter-group input[type="radio"][id^="filter-beds-"]:checked + label::before {
	background: radial-gradient(#1D6452 55%, white 45%);
}

.properties-filters input[type="checkbox"] ~ label:before {
	border:none;
}

.properties-filters input[type="checkbox"] ~ label { padding-left:10px; }

.filter-subtext { font-weight:400; }

/* Prevent any scaling/jumping on check */
.properties-filters .filter-group input[type="checkbox"] + label,
.properties-filters .filter-group input[type="checkbox"]:checked + label {
	transform: none;
	vertical-align: bottom;
}
.properties-filters .filter-group:has(input[type="checkbox"]),
.properties-filters .filter-group:has(input[type="radio"]) {
	display: block;            /* stack the heading label above */
	overflow-x: auto;          /* allow horizontal scroll if many items */
	white-space: nowrap;       /* keep checkbox/radio labels on one row */
}
.properties-filters .filter-group > label:first-child {
	display: block;            /* heading label on its own line */
	margin-bottom: 0px;
	white-space: normal;       /* allow heading to wrap */
	font-weight: 500;
}
.properties-filters .filter-group input[type="checkbox"] + label,
.properties-filters .filter-group input[type="radio"] + label {
	display: inline-flex;      /* lay out options inline in one row */
	white-space: nowrap;
	margin-right: 12px;
}

/* Region and Baths checkboxes: plain square boxes with green checkmark, no fill */
/* Keep only the first label (group heading) on its own row; option labels inline */
.properties-filters .filter-group > label:first-child {
	display: block;
}
.properties-filters .filter-group > label:not(:first-child)[for^="filter-region-"],
.properties-filters .filter-group > label:not(:first-child)[for^="filter-baths-"] {
	display: inline-flex;
	align-items: center;
	margin-right: 4px;
	margin-bottom: 0;
	vertical-align: middle;
	white-space: nowrap;
}
.properties-filters .filter-group > label[for^="filter-region-"]::before,
.properties-filters .filter-group > label[for^="filter-baths-"]::before {
	display: none !important;
	content: none !important;
}
.properties-filters .filter-group input[type="checkbox"][id^="filter-region-"],
.properties-filters .filter-group input[type="checkbox"][id^="filter-baths-"] {
	position: relative;
	opacity: 1;
	pointer-events: auto;
	width: 24px;
	height: 24px;
	margin-right: 6px; /* reduced gap between options */
	-webkit-appearance: none;
	appearance: none;
	background: #fff;               /* keep white both states */
	border: 0;                       /* no border */
	padding: 0;                      /* no padding */
	border-radius: 2px;             /* square corners */
	vertical-align: middle;
	box-sizing: border-box;
}
.properties-filters .filter-group input[type="checkbox"][id^="filter-region-"]::after,
.properties-filters .filter-group input[type="checkbox"][id^="filter-baths-"]::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 9px;                      /* larger tick */
	height: 16px;                    /* larger tick */
	border: solid #1D6452;           /* green checkmark */
	border-width: 0 3px 3px 0;       /* thicker stroke */
	transform: translate(-50%, -60%) rotate(45deg); /* center the checkmark */
	opacity: 0;
}
.properties-filters .filter-group input[type="checkbox"][id^="filter-region-"]:checked::after,
.properties-filters .filter-group input[type="checkbox"][id^="filter-baths-"]:checked::after {
	opacity: 1;
}

.properties-filters input[type="checkbox"] { visibility: visible; display: inline-block; }

.properties-filters .filter-group label { letter-spacing: 0px; }

.filter-group input:not([type="range"]),
.filter-group select,
.filter-group input[type="radio"] ~ label::before { border:1px solid #848484 !important; }

/* Results count (now outside filter box) */
.results-summary {
	margin: 20px 0;
	text-align: center;
}

.results-count {
	font-size: 17px;
	font-weight: 500;
	color: #070D0A;
}

/* Properties Container - Tiles View (slider-style layout) */
.tiles-view .properties-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 50px 25px;
}

.tiles-view .property-tile {
	background: white;
	display: flex;
	flex-direction: column;
	height: 100%;
	width:100%;
	max-width: 400px;
	margin: 0 auto;
	box-shadow: 0 3px 1.5px rgba(0, 0, 0, 0.1), 0 3px 1.5px rgba(0, 0, 0, 0.1);
}

.tiles-view .property-image {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	background: #f0f0f0;
	overflow: hidden;
}

.tiles-view .property-info-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 10px;
	background: white;
	gap: 15px;
	width: 100%;
	box-sizing: border-box;
	border-bottom: 1px solid #bdc4c2;
}

.tiles-view .property-info-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 17px;
	color: #070D0A;
}

.tiles-view .property-info-item img {
	width: 29px;
	height: 27px;
	flex-shrink: 0;
}

.tiles-view .property-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.tiles-view .property-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.tiles-view .property-tile:hover .property-image img {
	transform: scale(1.05);
}

.tiles-view .property-status {
	position: absolute;
	top: 15px;
	right: 15px;
	padding: 6px 12px;
	font-size: 17px;
	font-weight: 500;
	text-transform:capitalize;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	z-index: 10;
	background: #1B6551;
	color: white;
}

.tiles-view .property-content {
	padding: 20px 10px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.tiles-view .property-title {
	margin: 0 0 5px 0;
	font-size: 26px;
	font-weight: 500;
}

.tiles-view .property-title a {
	color: #1B6551;
	text-decoration: none;
	transition: color 0.3s ease;
}

.tiles-view .property-title a:hover {
	color: #145241;
}

.tiles-view .property-row {
	display: flex;
	gap: 20px;
	align-items: center;
}

.tiles-view .property-details {
	flex: 1;
	margin-bottom: 0;
}

.tiles-view .property-address-row {
	width: 100%;
	margin-top:10px;
}

.tiles-view .property-detail {
	margin-bottom: 0px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tiles-view .property-detail .detail-label {
	font-size: 12px;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tiles-view .property-detail .detail-value {
	font-size: 17px;
	color: #0D0708;
}

.tiles-view .property-price .detail-value {
	font-size: 17px;
	font-weight: 700;
	color: #0D0708;
}

.tiles-view .property-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
}

.tiles-view .learn-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 19px 44px 19px 16px;
	background: #1B6551;
	color: white;
	text-align: center;
	text-decoration: none;
	font-weight: 400;
	font-size: 17px;
	transition: background 0.3s ease;
	background-image: url('../images/full-arrow-white.svg');
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 21px 18px;
	border-radius: 0;
	border: none;
	white-space: nowrap;
}

.tiles-view .learn-more-btn:hover {
	opacity: 0.85;
}

/* Property specs at bottom of tile */
.tiles-view .property-specs {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 15px 0 0 0;
	margin-top: 15px;
}

.tiles-view .property-spec {
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 8px;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
}

.tiles-view .property-spec .spec-label {
	font-weight: 500;
	color: #070D0A;
}

.tiles-view .property-spec .spec-value {
	font-weight: 400;
	color: #070D0A;
}

/* =============================================================================
   TABLE VIEW STYLES
   ============================================================================= */

.table-view .properties-container {
	display: table;
	width: 100%;
	border-collapse: collapse;
	background: white;
	
	overflow: hidden;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table-view .property-tile {
	display: table-row;
	border-bottom: 1px solid #e0e0e0;
	transition: background 0.2s ease;
}

.table-view .property-tile:hover {
	background: #f8f9fa;
}

.table-view .property-tile:last-child {
	border-bottom: none;
}

.table-view .property-image {
	display: table-cell;
	width: 120px;
	height: 100px;
	padding: 15px;
	vertical-align: middle;
	position: relative;
}

.table-view .property-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	
}

.table-view .property-status {
	position: absolute;
	top: 20px;
	right: 20px;
	padding: 4px 8px;
	
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.table-view .property-status.status-for_sale {
	background: #1B6551;
	color: white;
}

.table-view .property-status.status-sold {
	background: #A08355;
	color: white;
}

.table-view .property-content {
	display: table-cell;
	padding: 15px;
	vertical-align: middle;
}

.table-view .property-title {
	margin: 0 0 10px 0;
	font-size: 1.1rem;
	color: #1B6551;
	font-weight: 700;
}

.table-view .property-details {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.table-view .property-detail {
	display: flex;
	gap: 5px;
	align-items: baseline;
}

.table-view .property-detail .detail-label {
	font-size: 12px;
	font-weight: 600;
	color: #666;
}

.table-view .property-detail .detail-value {
	font-size: 13px;
	color: #333;
}

.table-view .property-price .detail-value {
	font-size: 16px;
	font-weight: 700;
	color: #1B6551;
}

.table-view .property-actions {
	display: table-cell;
	padding: 15px;
	vertical-align: middle;
	width: 150px;
}

.table-view .learn-more-btn {
	display: inline-block;
	padding: 10px 20px;
	background: #1B6551;
	color: white;
	text-align: center;
	text-decoration: none;
	
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.3s ease;
}

.table-view .learn-more-btn:hover {
	background: #145241;
}

/* No Properties Message */
.no-properties {
	text-align: center;
	padding: 60px 20px;
	color: #666;
}

.no-properties p {
	font-size: 18px;
	margin: 0;
}

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

/* Medium screens - wrap filters to 2 columns */
@media (max-width: 1100px) {
	.filters-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.tamarack-properties-tiles .sec-title {
		text-align: center;
		padding-top: 50px;
	}
	
	.tamarack-properties-tiles .properties-container {
		padding-bottom: 50px;
	}
	
	.filters-grid {
		grid-template-columns: 1fr;
	}
	
	.filters-header {
		flex-direction: column;
		gap: 15px;
		align-items: flex-start;
		padding-top:75px;
	}
	
	.properties-filters .clear-filters-btn {
		width: auto;
	}
	
	.tiles-view .properties-container {
		grid-template-columns: 1fr;
	}
	
	/* Force table view to display as tiles on mobile */
	.table-view .properties-container {
		display: grid;
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.table-view .property-tile {
		display: flex;
		flex-direction: column;
		border: 1px solid #e0e0e0;
		
		overflow: hidden;
	}
	
	.table-view .property-image {
		display: block;
		width: 100%;
		height: 200px;
		padding: 0;
	}
	
	.table-view .property-image img {
		border-radius: 0;
	}
	
	.table-view .property-content {
		display: block;
		padding: 15px;
	}
	
	.table-view .property-title {
		margin-bottom: 15px;
	}
	
	.table-view .property-details {
		flex-direction: column;
		gap: 10px;
	}
	
	.table-view .property-detail {
		flex-direction: column;
		gap: 2px;
	}
	
	.table-view .property-actions {
		display: block;
		width: 100%;
		padding: 15px;
	}
	
	.table-view .learn-more-btn {
		display: block;
		width: 100%;
	}
	
	/* Mobile Filter Panel */
	.mobile-filter-toggle-container {
		display: flex;
	}
	
	.mobile-filter-toggle {
		display: inline-block;
	}
	
	.mobile-filter-close {
		display: flex;
	}
	
	/* Hide view toggle buttons from filter panel on mobile */
	.properties-filters .view-toggle-buttons {
		display: none;
	}
	
	.mobile-show-results-container {
		display: flex;
	}

	.mobile-show-results-btn {
		margin:0 auto;
	}
	
	.properties-filters {
		position: fixed;
		top: 0;
		left: -100%;
		width: 85%;
		max-width: 400px;
		height: 100vh;
		overflow-y: auto;
		z-index: 1000;
		margin-bottom: 0;
		transition: left 0.3s ease;
		box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
	}
	
	.properties-filters.active {
		left: 0;
	}
	
	.filters-header {
		position: relative;
		padding-right: 0;
		padding-top: 50px;
	}
	
	.filters-grid {
		gap: 30px;
	}
}

/* =============================================================================
   MAP VIEW STYLES
   ============================================================================= */

.map-view-container {
	width: 100%;
	margin-bottom: 30px;
}

.map-view-container > div {
	border-radius: 0;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure mapbox styles are loaded */
.mapboxgl-map {
	font-family: "arboria", sans-serif;
}

/* Mobile responsiveness for view toggle buttons */
@media (max-width: 768px) {
	.view-toggle-buttons {
		order: -1;
	}
	
	.filter-actions {
		flex-wrap: wrap;
		width: 100%;
	}
}


