/* ══════════════════════════════════════════════════
   LSP Multi-Select Checkbox Dropdown Component
   ══════════════════════════════════════════════════ */

.lsp-multiselect {
	position: relative;
	width: 100%;
}

/* ── Trigger Button ──────────────────────────────── */
.lsp-ms-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	padding: 0.7rem 0;
	border: none;
	border-bottom: 1.5px solid #e0e0e0;
	background: transparent;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.95rem;
	color: #555;
	transition: border-color 0.3s ease, color 0.3s ease;
	width: 100%;
	gap: 8px;
	user-select: none;
}

.lsp-ms-trigger:hover {
	border-bottom-color: #BCAAA4;
	color: #333;
}

.lsp-multiselect.open .lsp-ms-trigger {
	border-bottom-color: #A1887F;
	color: #333;
}

.lsp-ms-trigger .lsp-ms-text {
	flex: 1;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lsp-ms-trigger .lsp-ms-text.has-selection {
	color: #333;
	font-weight: 500;
}

.lsp-ms-chevron {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	transition: transform 0.3s ease;
	color: #999;
}

.lsp-multiselect.open .lsp-ms-chevron {
	transform: rotate(180deg);
	color: #A1887F;
}

/* ── Dropdown Panel ──────────────────────────────── */
.lsp-ms-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: -12px;
	min-width: calc(100% + 24px);
	max-height: 320px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
	z-index: 1000;
	overflow: hidden;
	animation: lspMsFadeIn 0.2s ease;
}

.lsp-multiselect.open .lsp-ms-dropdown {
	display: flex;
	flex-direction: column;
}

@keyframes lspMsFadeIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Header (Select All + Search) ────────────────── */
.lsp-ms-header {
	display: flex;
	align-items: center;
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	gap: 8px;
	flex-shrink: 0;
}

.lsp-ms-header .lsp-ms-check-all-wrap {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.lsp-ms-header .lsp-ms-search-wrap {
	flex: 1;
	position: relative;
}

.lsp-ms-search {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.82rem;
	color: #333;
	outline: none;
	transition: border-color 0.2s;
	background: #fafafa;
	box-sizing: border-box;
}

.lsp-ms-search:focus {
	border-color: #BCAAA4;
	background: #fff;
}

.lsp-ms-search::placeholder {
	color: #bbb;
}

/* ── Options List ────────────────────────────────── */
.lsp-ms-options {
	overflow-y: auto;
	max-height: 240px;
	padding: 4px 0;
}

.lsp-ms-options::-webkit-scrollbar {
	width: 5px;
}

.lsp-ms-options::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 3px;
}

.lsp-ms-options::-webkit-scrollbar-thumb:hover {
	background: #ccc;
}

/* ── Option Item ─────────────────────────────────── */
.lsp-ms-item {
	display: flex;
	align-items: center;
	padding: 7px 14px;
	cursor: pointer;
	font-size: 0.88rem;
	color: #444;
	transition: background 0.15s ease;
	gap: 10px;
	user-select: none;
}

.lsp-ms-item:hover {
	background: #f7f4f2;
}

.lsp-ms-item.lsp-ms-hidden {
	display: none;
}

/* ── Group Header (for hierarchical like Stile) ─── */
.lsp-ms-group-header {
	padding: 10px 14px 4px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #A1887F;
	pointer-events: none;
	margin-top: 4px;
}

.lsp-ms-group-header:first-child {
	margin-top: 0;
}

/* ── Custom Checkbox ─────────────────────────────── */
.lsp-ms-checkbox {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border: 1.5px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	flex-shrink: 0;
	position: relative;
	transition: all 0.2s ease;
}

.lsp-ms-checkbox:hover {
	border-color: #A1887F;
}

.lsp-ms-checkbox:checked {
	background: #5D4037;
	border-color: #5D4037;
}

.lsp-ms-checkbox:checked::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Indeterminate state for "Select All" */
.lsp-ms-checkbox.lsp-ms-indeterminate {
	background: #BCAAA4;
	border-color: #BCAAA4;
}

.lsp-ms-checkbox.lsp-ms-indeterminate::after {
	content: '';
	position: absolute;
	top: 7px;
	left: 3px;
	width: 10px;
	height: 2px;
	background: #fff;
	border: none;
	transform: none;
}

/* ── No Results ──────────────────────────────────── */
.lsp-ms-no-results {
	padding: 16px 14px;
	font-size: 0.85rem;
	color: #999;
	text-align: center;
	font-style: italic;
}

/* ── Updated Search Form Styles ──────────────────── */
.lsp-search-basic-form {
	background: #fff;
	padding: 28px 32px;
	display: flex;
	gap: 24px;
	align-items: flex-end;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
	border-radius: 14px;
	flex-wrap: wrap;
	border: 1px solid #f0eeec;
}

.lsp-search-field {
	flex: 1;
	min-width: 160px;
}

.lsp-search-field > label {
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #A1887F;
	margin-bottom: 4px;
	font-weight: 700;
}

/* ── Submit Button (round icon) ──────────────────── */
.lsp-search-submit-wrap {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-end;
	padding-bottom: 4px;
}

.lsp-search-btn-round {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #3a3a3a;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lsp-search-btn-round:hover {
	background: #5D4037;
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(93, 64, 55, 0.3);
}

/* ── Mobile Responsive ───────────────────────────── */
@media (max-width: 768px) {
	.lsp-search-basic-form {
		flex-direction: column;
		gap: 12px;
		align-items: stretch;
		padding: 24px 20px;
	}

	.lsp-search-field {
		min-width: 100%;
	}

	.lsp-ms-dropdown {
		left: 0;
		min-width: 100%;
		max-width: 100%;
	}

	.lsp-search-submit-wrap {
		display: flex;
		justify-content: center;
		margin-top: 8px;
		padding-bottom: 0;
	}

	.lsp-search-btn-round {
		width: 100%;
		border-radius: 8px;
		height: 44px;
	}
}
