/**
 * Sidebar Filters CSS
 *
 * @package Ermax_Garage
 */

/* Box-sizing pour tous les éléments de la sidebar */
.ermax-sidebar-filters,
.ermax-sidebar-filters * {
	box-sizing: border-box;
}

.ermax-sidebar-filters {
	container-type: inline-size;
	padding: 24px;
	background-color: var(--e-global-color-ermax-white, #FFFFFF);
}

/* Bloc véhicule sélectionné */
.ermax-filter-vehicle {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #E0E0E0;
	background: none !important;
	border-left: none !important;
	border-top: none !important;
	border-right: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-top: 0 !important;
	border-radius: 0 !important;
}

.ermax-filter-vehicle h4 {
	margin: 0 0 16px;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #0C0C0C;
}

.ermax-vehicle-card {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ermax-vehicle-image {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.ermax-vehicle-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ermax-vehicle-info strong {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #161616;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ermax-vehicle-info span {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	color: var(--e-global-color-ermax-grey, #9A9A9A);
}

/* Override Elementor Kit styles for buttons */
.elementor-kit-5 .ermax-vehicle-change,
.ermax-vehicle-change {
	flex-basis: auto;
	padding: 6px 12px;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: #3FAF7A;
	background: none;
	border: 1px solid #3FAF7A;
	border-radius: 4px;
	cursor: pointer;
	text-align: center;
	transition: all 150ms ease;
	white-space: nowrap;
}

.elementor-kit-5 .ermax-vehicle-change:hover,
.ermax-vehicle-change:hover {
	background-color: var(--e-global-color-accent, #3FAF7A) !important;
	color: var(--e-global-color-ermax-white, #FFFFFF) !important;
}

.ermax-filter-vehicle-empty {
	text-align: center;
	padding: 20px;
}

.ermax-filter-vehicle-empty p {
	margin: 0 0 12px;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	color: var(--e-global-color-ermax-grey, #9A9A9A);
}

/* Override Elementor Kit styles for empty state button */
.elementor-kit-5 .ermax-filter-vehicle-empty button,
.ermax-filter-vehicle-empty button {
	padding: 8px 16px !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: var(--e-global-color-ermax-white, #FFFFFF) !important;
	background-color: var(--e-global-color-accent, #3FAF7A) !important;
	border: none !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	transition: all 150ms ease !important;
}

.elementor-kit-5 .ermax-filter-vehicle-empty button:hover,
.ermax-filter-vehicle-empty button:hover {
	background-color: var(--e-global-color-ermax-green-deep, #2D5445) !important;
}

/* Reset Filters Button */
.ermax-filter-reset {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #E0E0E0;
}

/* Override Elementor Kit styles for reset button */
.elementor-kit-5 .ermax-reset-filters-btn,
.ermax-reset-filters-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 10px 16px !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #E53E3E !important;
	background-color: #FFF5F5 !important;
	border: 1px solid #FC8181 !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	transition: all 150ms ease !important;
}

.elementor-kit-5 .ermax-reset-filters-btn:hover,
.ermax-reset-filters-btn:hover {
	background-color: #FED7D7 !important;
	border-color: #E53E3E !important;
}

.ermax-reset-filters-btn svg {
	flex-shrink: 0;
}

/* Filter sections */
.ermax-filter-section {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #E0E0E0;
}

.ermax-filter-section:last-child {
	border-bottom: none;
}

.ermax-filter-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 16px;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--e-global-color-primary, #0C0C0C);
	cursor: pointer;
	user-select: none;
}

.ermax-chevron {
	transition: transform 200ms ease;
}

.ermax-filter-title[aria-expanded="false"] .ermax-chevron {
	transform: rotate(-90deg);
}

.ermax-filter-content {
	transition: max-height 200ms ease;
}

/* Filter options */
.ermax-filter-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ermax-filter-options li {
	margin-bottom: 8px;
}

.ermax-filter-options label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	color: var(--e-global-color-ermax-grey, #9A9A9A);
	cursor: pointer;
	transition: color 150ms ease;
}

.ermax-filter-options label:hover {
	color: var(--e-global-color-text, #0C0C0C);
}

.ermax-filter-options input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--e-global-color-accent, #3FAF7A);
}

.ermax-option-label {
	flex: 1;
}

.ermax-option-count {
	font-size: 13px;
	color: var(--e-global-color-ermax-grey, #9A9A9A);
}

/* Color swatches */
.ermax-color-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.ermax-color-swatch {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 1px solid #D0D0D0;
	border-radius: 3px;
}

/* Bandeau véhicule */
.ermax-garage-banner {
	position: sticky;
	top: 0;
	z-index: 999;
	background-color: var(--e-global-color-accent, #3FAF7A);
	color: var(--e-global-color-ermax-white, #FFFFFF);
	padding: 12px 24px;
	margin-bottom: 24px;
}

.ermax-banner-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.ermax-banner-icon {
	flex-shrink: 0;
}

.ermax-banner-text {
	flex: 1;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
}

.ermax-banner-text strong {
	font-weight: 600;
}

.ermax-banner-modify,
.ermax-banner-close {
	padding: 6px 12px;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 600;
	background-color: rgba(255, 255, 255, 0.2);
	color: var(--e-global-color-ermax-white, #FFFFFF);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	cursor: pointer;
	transition: all 150ms ease;
}

.ermax-banner-modify:hover,
.ermax-banner-close:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

.ermax-banner-close {
	font-size: 20px;
	line-height: 1;
	padding: 4px 8px;
}

/* Empty state */
.ermax-empty-state {
	text-align: center;
	padding: 60px 24px;
}

.ermax-empty-icon {
	margin: 0 auto 24px;
	color: var(--e-global-color-ermax-grey, #9A9A9A);
}

.ermax-empty-state h3 {
	margin: 0 0 12px;
	font-family: 'Zalando Sans Expanded', sans-serif;
	font-weight: 900;
	font-size: 20px;
	color: var(--e-global-color-text, #161616);
}

.ermax-empty-state p {
	margin: 0 0 24px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	color: var(--e-global-color-ermax-grey, #9A9A9A);
}

.ermax-empty-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
}

.ermax-btn-primary,
.ermax-btn-secondary {
	padding: 10px 20px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: all 150ms ease;
}

.ermax-btn-primary {
	background-color: var(--e-global-color-accent, #3FAF7A);
	color: var(--e-global-color-ermax-white, #FFFFFF);
	border: none;
}

.ermax-btn-primary:hover {
	background-color: var(--e-global-color-ermax-green-deep, #2D5445);
}

.ermax-btn-secondary {
	background: none;
	color: var(--e-global-color-accent, #3FAF7A);
	border: 1px solid var(--e-global-color-accent, #3FAF7A);
}

.ermax-btn-secondary:hover {
	background-color: var(--e-global-color-accent, #3FAF7A);
	color: var(--e-global-color-ermax-white, #FFFFFF);
}

/* Mobile responsive */
@media (max-width: 768px) {
	.ermax-banner-text {
		font-size: 13px;
	}

	.ermax-banner-modify {
		display: none;
	}

	.ermax-empty-actions {
		flex-direction: column;
	}

	.ermax-empty-actions button {
		width: 100%;
	}
}

/* Sidebar vehicle card: vertical when narrow sidebar */
@container (max-width: 250px) {
	.ermax-vehicle-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.ermax-vehicle-image {
		width: 80px;
		height: 80px;
	}
	.ermax-vehicle-info {
		align-items: center;
	}
	.ermax-vehicle-info strong {
		white-space: normal;
		text-align: center;
	}
	.ermax-vehicle-change {
		width: 100%;
	}
}

/* Fallback for browsers without container queries: sidebar narrow on mobile */
@media (max-width: 768px) {
	.ermax-sidebar-filters .ermax-vehicle-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.ermax-sidebar-filters .ermax-vehicle-image {
		width: 80px;
		height: 80px;
	}
	.ermax-sidebar-filters .ermax-vehicle-info {
		align-items: center;
	}
	.ermax-sidebar-filters .ermax-vehicle-info strong {
		white-space: normal;
		text-align: center;
	}
	.ermax-sidebar-filters .ermax-vehicle-change {
		width: 100%;
	}
}

/* Sidebar always vertical (narrow column) */
.ermax-sidebar-filters .ermax-vehicle-card {
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ermax-sidebar-filters .ermax-vehicle-image {
	width: 80px;
	height: 80px;
}
.ermax-sidebar-filters .ermax-vehicle-info {
	align-items: center;
}
.ermax-sidebar-filters .ermax-vehicle-info strong {
	white-space: normal;
	text-align: center;
	word-break: break-word;
}
.ermax-sidebar-filters .ermax-vehicle-change {
	width: 100%;
}
