/**
 * Collection Filter Panel Styles
 *
 * @package Onviqa
 * @since 1.0.0
 */

/* ==========================================================================
   Filter Panel Container
   ========================================================================== */

.only-filter-panel {
	/* Individual filter blocks have their own styling */
	display: block;
	width: 100%;
}

.only-filter-panel__content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0;
}

/* Mobile Toggle Button */
.only-filter-panel__mobile-toggle {
	display: none;
	width: 100%;
	padding: 14px 20px;
	background: #fff;
	border: 1px solid #E6E9F0;
	border-radius: 8px;
	font-family: 'Roboto Flex', sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #222222;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: all 0.2s ease;
}

.only-filter-panel__mobile-toggle svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: #666666;
}

.only-filter-panel__mobile-toggle:hover {
	border-color: #222222;
	background: #FAFAFA;
}

.only-filter-panel__mobile-toggle:active {
	background: #F5F5F5;
}

.only-filter-panel__badge {
	background: #FF5100;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 100px;
	margin-left: 4px;
}

/* ==========================================================================
   Mobile Filter Panel Header
   ========================================================================== */

.only-filter-panel__mobile-header {
	display: none;
}

.only-filter-panel__mobile-actions {
	display: none;
}

@media (max-width: 1024px) {
	.only-filter-panel {
		border: none;
		border-radius: 0;
		background: transparent;
	}
	
	/* Hide old toggle button - using new toolbar filter button */
	.only-filter-panel__mobile-toggle {
		display: none;
	}
	
	/* Hide sidebar visual but keep filter panel accessible for modal */
	.only-collection__sidebar {
		position: static;
		width: 0;
		height: 0;
		overflow: visible;
		padding: 0;
		margin: 0;
	}
	
	/* Filter panel itself needs to be positioned */
	.only-filter-panel {
		position: static;
	}
	
	/* ============================================
	   MOBILE FILTER PANEL - FULL SCREEN MODAL
	   ============================================ */
	.only-filter-panel__content {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		height: 100dvh; /* Dynamic viewport height for mobile browsers */
		background: #fff;
		z-index: 999999;
		flex-direction: column;
		overflow: hidden;
	}
	
	.only-filter-panel__content.is-open {
		display: flex;
	}
	
	/* Lock body scroll when filter panel is open */
	body.filters-open {
		overflow: hidden !important;
		position: fixed;
		width: 100%;
		height: 100%;
	}
	
	/* ============================================
	   HEADER - Fixed at top (52px)
	   ============================================ */
	.only-filter-panel__mobile-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 52px;
		min-height: 52px;
		padding: 0 16px;
		background: #F5F6FA;
		border-bottom: 1px solid #E6E9F0;
		flex-shrink: 0;
	}
	
	.only-filter-panel__mobile-title {
		display: flex;
		align-items: center;
		gap: 8px;
		font-family: 'Roboto Flex', sans-serif;
		font-size: 16px;
		font-weight: 600;
		line-height: 19px;
		color: #222222;
		margin: 0;
	}
	
	.only-filter-panel__mobile-title svg {
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}
	
	.only-filter-panel__close {
		width: 28px;
		height: 28px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #FFFFFF;
		border: 1.5px solid #222222;
		border-radius: 20px;
		color: #222222;
		cursor: pointer;
		padding: 0;
		flex-shrink: 0;
	}
	
	.only-filter-panel__close svg {
		width: 10px;
		height: 10px;
	}
	
	/* ============================================
	   SCROLLABLE MIDDLE AREA
	   Contains: Active Filters + Filter Groups
	   ============================================ */
	.only-filter-panel__content > .only-active-filters {
		margin: 16px 20px 0;
		flex-shrink: 0;
	}
	
	.only-filter-panel__content > .only-filter-panel__filters {
		flex: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 16px 20px 100px; /* Extra bottom padding for fixed buttons */
		min-height: 0;
	}
	
	/* ============================================
	   BOTTOM BUTTONS - Fixed at bottom (82px)
	   ============================================ */
	.only-filter-panel__mobile-actions {
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		gap: 12px;
		padding: 16px 20px;
		background: #fff;
		border-top: 1px solid #E6E9F0;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
		z-index: 1000000;
		min-height: 82px;
	}
	
	.only-filter-panel__apply-btn {
		flex: 1;
		height: 50px;
		background: #FF5100;
		border: none;
		border-radius: 12px;
		font-family: 'Roboto Flex', sans-serif;
		font-size: 16px;
		font-weight: 600;
		color: #fff;
		cursor: pointer;
		transition: background 0.2s ease;
	}
	
	.only-filter-panel__apply-btn:hover {
		background: #E54900;
	}
	
	.only-filter-panel__clear-btn {
		padding: 0 20px;
		height: 50px;
		background: #f5f5f5;
		border: none;
		border-radius: 12px;
		font-family: 'Roboto Flex', sans-serif;
		font-size: 16px;
		font-weight: 500;
		color: #666;
		cursor: pointer;
		transition: background 0.2s ease;
	}
	
	.only-filter-panel__clear-btn:hover {
		background: #eee;
	}
}

/* ==========================================================================
   Active Filters Section - Figma Design
   Container: 342px, background #FFFFFF, border 1px #E6E9F0, radius 8px
   ========================================================================== */

.only-active-filters {
	background: #FFFFFF;
	border: 1px solid #E6E9F0;
	border-radius: 8px;
	margin-bottom: 16px;
	overflow: visible; /* Allow content to be visible, no scroll */
}

.only-active-filters.is-hidden {
	display: none;
}

/* Header: 46px height, background #F5F6FA */
.only-active-filters__header {
	background: #F5F6FA;
	border-bottom: 1px solid #E6E9F0;
}

.only-active-filters__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 46px;
	padding: 0 16px;
	background: transparent;
	border: none;
	cursor: pointer;
}

.only-active-filters__toggle span {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: #222222;
}

.only-active-filters__chevron {
	width: 12px;
	height: 6px;
	color: #222222;
	transition: transform 0.2s ease;
}

.only-active-filters__toggle[aria-expanded="false"] .only-active-filters__chevron {
	transform: rotate(180deg);
}

/* Toggle left section with text and badge */
.only-active-filters__toggle-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Active filters badge - Same as Filter button badge */
.only-active-filters__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: #FF5100;
	border-radius: 50%;
	font-family: 'Roboto Flex', sans-serif;
	font-size: 10px;
	font-weight: 600;
	line-height: 12px;
	color: #FFFFFF;
}

/* Body: padding 16px, gap 20px between items */
.only-active-filters__body {
	display: flex;
	flex-direction: column;
	padding: 16px;
	gap: 20px;
}

/* Hide body when collapsed - uses is-collapsed class added by JS */
.only-active-filters.is-collapsed .only-active-filters__body {
	display: none;
}

/* Filter Items List */
.only-active-filters__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Individual Filter Item */
.only-active-filters__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.only-active-filters__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Label: 12px, 400 weight, #666666 */
.only-active-filters__label {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 400;
	font-size: 12px;
	line-height: 14px;
	color: #666666;
}

/* Value: 14px, 500 weight, #222222 */
.only-active-filters__value {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 14px;
	line-height: 16px;
	color: #222222;
}

/* Delete/Remove Button: 20x20px icon */
.only-active-filters__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #222222;
	transition: color 0.2s ease;
	flex-shrink: 0;
}

.only-active-filters__remove:hover {
	color: #FF5100;
}

.only-active-filters__remove svg {
	width: 20px;
	height: 20px;
}

/* Clear All: 16px, 500 weight, underlined, #FF5100 */
.only-active-filters__clear-all {
	padding: 0;
	background: transparent;
	border: none;
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	text-decoration: underline;
	color: #FF5100;
	cursor: pointer;
	transition: color 0.2s ease;
	text-align: left;
}

.only-active-filters__clear-all:hover {
	color: #e04800;
}

/* Legacy chip styles (keeping for backward compatibility) */
.only-filter-panel__active {
	padding: 20px;
	background: #f9f9f9;
	border-bottom: 1px solid #e5e5e5;
}

.only-filter-panel__active.is-hidden {
	display: none;
}

.only-filter-panel__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.only-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 100px;
	font-size: 13px;
	color: #1a1a1a;
	cursor: pointer;
	transition: all 0.2s ease;
}

.only-filter-chip:hover {
	border-color: #ff4444;
	color: #ff4444;
}

.only-filter-chip svg {
	flex-shrink: 0;
}

.only-filter-panel__clear-all {
	padding: 8px 16px;
	background: transparent;
	border: none;
	font-size: 13px;
	font-weight: 500;
	color: #FF6B35;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.only-filter-panel__clear-all:hover {
	color: #e55a2a;
}

/* ==========================================================================
   Filter Groups - Same style as Active Filtering (Figma Design)
   Container: white bg, 1px #E6E9F0 border, 8px radius
   Header: 46px height, #F5F6FA background
   ========================================================================== */

.only-filter-panel__filters {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.only-filter-group {
	background: #FFFFFF;
	border: 1px solid #E6E9F0;
	border-radius: 8px;
}

.only-filter-group__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 46px;
	padding: 0 16px;
	background: #F5F6FA;
	border: none;
	border-bottom: 1px solid #E6E9F0;
	border-radius: 8px 8px 0 0;
	cursor: pointer;
	text-align: left;
	transition: background-color 0.2s ease;
}

.only-filter-group__header:hover {
	background: #EBEDF2;
}

/* When collapsed, header has full rounded corners */
.only-filter-group__header[aria-expanded="false"] {
	border-bottom: none;
	border-radius: 8px;
}

.only-filter-group__title {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: #222222;
}

.only-filter-group__chevron {
	width: 12px;
	height: 6px;
	color: #222222;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.only-filter-group__header[aria-expanded="true"] .only-filter-group__chevron {
	transform: rotate(180deg);
}

.only-filter-group__header[aria-expanded="false"] .only-filter-group__chevron {
	transform: rotate(0deg);
}

.only-filter-group__body {
	padding: 16px;
}

.only-filter-group__header[aria-expanded="false"] + .only-filter-group__body {
	display: none;
}

/* ==========================================================================
   Price Range Filter - Figma Design
   Slider: 8px height, #DDDDDD track, #FF5100 range
   Handles: 24px, white, shadow
   Inputs: 100px × 40px, 1px #E6E9F0 border, 4px radius
   ========================================================================== */

.only-filter-price {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Slider Section - Figma: slider first, then inputs */
.only-filter-price__slider {
	position: relative;
	height: 24px;
	display: flex;
	align-items: center;
	margin: 0 4px;
}

/* Track: 8px height, #DDDDDD, 4px radius */
.only-filter-price__track {
	position: absolute;
	left: 0;
	right: 0;
	height: 8px;
	background: #DDDDDD;
	border-radius: 4px;
}

/* Active range: #FF5100, 8px height, 4px radius */
.only-filter-price__range {
	position: absolute;
	height: 8px;
	background: #FF5100;
	border-radius: 4px;
	pointer-events: none;
}

.only-filter-price__handle {
	position: absolute;
	width: 100%;
	height: 8px;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

/* Handle thumb: 24px, white bg, shadow */
.only-filter-price__handle::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	background: #FFFFFF;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.only-filter-price__handle::-webkit-slider-thumb:hover {
	transform: scale(1.05);
	box-shadow: 0px 6px 8px -1px rgba(0, 0, 0, 0.15), 0px 3px 6px -1px rgba(0, 0, 0, 0.1);
}

.only-filter-price__handle::-moz-range-thumb {
	width: 24px;
	height: 24px;
	background: #FFFFFF;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Input boxes: 100px × 40px layout with "to" separator - Figma Exact */
.only-filter-price__inputs {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0;
	width: 100%;
}

/* Input group: 120px × 40px, white bg, 1px #E6E9F0 border, 4px radius */
.only-filter-price__input-group {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 120px;
	min-width: 120px;
	max-width: 120px;
	height: 40px;
	background: #FFFFFF;
	border: 1px solid #E6E9F0;
	border-radius: 4px;
	padding: 0 12px;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
	flex-shrink: 0;
	gap: 2px;
}

.only-filter-price__input-group:focus-within {
	border-color: #FF5100;
}

/* Currency symbol: 16px, 500 weight, #222222 */
.only-filter-price__currency {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: #222222;
	flex-shrink: 0;
}

/* Input: 16px, 500 weight, #222222 - NO border, fully transparent */
.only-filter-price__input {
	width: 100%;
	max-width: 80px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: #222222;
	text-align: left;
	-webkit-appearance: none;
	-moz-appearance: textfield;
}

.only-filter-price__input:focus {
	outline: none !important;
	border: none !important;
	box-shadow: none !important;
}

.only-filter-price__input::-webkit-inner-spin-button,
.only-filter-price__input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
	display: none;
}

.only-filter-price__input[type="number"] {
	-moz-appearance: textfield;
}

/* Remove any browser default styling on inputs */
.only-filter-price__input-group input {
	border: none !important;
	outline: none !important;
	background: transparent !important;
}

/* Separator "to": 16px, 500 weight, #888888 */
.only-filter-price__separator {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: #888888;
	flex-shrink: 0;
}

/* ==========================================================================
   Checkbox List Filter - Figma Exact Specs
   ========================================================================== */

/* Search Box: Figma Exact - 310px × 50px, 1px #222222 border, 4px radius */
.only-filter-search {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 12px !important;
	width: 100% !important;
	height: 50px !important;
	padding: 0 16px !important;
	background: #FFFFFF !important;
	border: 1px solid #222222 !important;
	border-radius: 4px !important;
	margin-bottom: 20px !important;
	box-sizing: border-box !important;
	transition: border-color 0.2s ease;
}

.only-filter-search:focus-within {
	border-color: #FF5100 !important;
}

.only-filter-search__icon {
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
	flex-shrink: 0 !important;
	color: #99A0AA !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.only-filter-search__icon svg {
	width: 24px !important;
	height: 24px !important;
	color: #99A0AA !important;
}

.only-filter-search__icon svg circle,
.only-filter-search__icon svg path {
	stroke: #99A0AA !important;
}

.only-filter-search__input {
	flex: 1 !important;
	width: 100% !important;
	min-width: 0 !important;
	height: 100% !important;
	border: none !important;
	background: transparent !important;
	font-family: 'Roboto Flex', sans-serif !important;
	font-style: normal !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 16px !important;
	color: #222222 !important;
	outline: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
}

.only-filter-search__input::placeholder {
	color: #99A0AA !important;
}

.only-filter-search__input:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* Filter List: 16px gap between items */
.only-filter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px; /* Figma: 16px gap */
}

.only-filter-list__item {
	margin: 0;
}

.only-filter-list__item.is-hidden-option {
	display: none;
}

.only-filter-list__item.is-hidden-option.is-visible {
	display: block;
}

/* Checkbox row: flex with space-between */
.only-filter-checkbox {
	display: flex;
	align-items: center;
	gap: 12px; /* Figma: 12px gap between checkbox and label */
	padding: 0;
	cursor: pointer;
	transition: color 0.2s ease;
}

.only-filter-checkbox:hover {
	color: #FF5100;
}

.only-filter-checkbox__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* Checkbox box: 16×16px, 1px #AAAAAA border, 2px radius */
.only-filter-checkbox__box {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background: #FFFFFF;
	border: 1px solid #AAAAAA;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
}

.only-filter-checkbox__box svg {
	opacity: 0;
	transform: scale(0.5);
	transition: all 0.15s ease;
	color: #fff;
	width: 10px;
	height: 10px;
}

/* Checked state: #FF5100 background */
.only-filter-checkbox__input:checked + .only-filter-checkbox__box {
	background: #FF5100;
	border-color: #FF5100;
}

.only-filter-checkbox__input:checked + .only-filter-checkbox__box svg {
	opacity: 1;
	transform: scale(1);
}

.only-filter-checkbox__input:focus-visible + .only-filter-checkbox__box {
	outline: 2px solid #FF5100;
	outline-offset: 2px;
}

/* Label: 14px, #222222 */
.only-filter-checkbox__label {
	flex: 1;
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 400;
	font-size: 14px;
	line-height: 16px;
	color: #222222;
}

/* Count: 14px, #666666, right-aligned */
.only-filter-checkbox__count {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 400;
	font-size: 14px;
	line-height: 16px;
	text-align: right;
	color: #666666;
}

/* "+ See All" Button - Figma: 16px, #FF5100 */
.only-filter-group__show-more {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	margin-top: 20px; /* Figma: 20px gap from list */
	background: transparent;
	border: none;
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	line-height: 19px;
	color: #FF5100;
	cursor: pointer;
	transition: color 0.2s ease;
}

.only-filter-group__show-more:hover {
	color: #e04800;
}

/* Plus icon for See All */
.only-filter-group__show-more::before {
	content: '+';
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
}

.only-filter-group__show-more.is-expanded::before {
	content: '−'; /* Minus sign when expanded */
}

.only-filter-group__show-more svg {
	display: none; /* Hide the chevron, use + icon instead */
}

/* ==========================================================================
   Mobile Close Button
   ========================================================================== */

/* Legacy styles removed - consolidated above */

/* ==========================================================================
   Loading State
   ========================================================================== */

.only-filter-panel--loading {
	pointer-events: none;
	opacity: 0.7;
}

.only-filter-panel--loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	border: 2px solid #FF6B35;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

