/* Dropdown Filters — shadcn-inspired multi-select */

.block--blog-filters {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.dropdown-filters {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dropdown-filters__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.dropdown-filters__icon {
  width: 22px;
  height: 22px;
  color: var(--vpm-purple-900, #341c4c);
}

.dropdown-filters__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--vpm-purple-900, #341c4c);
  margin: 0;
  line-height: 1.3;
}

.dropdown-filters__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Multi-select dropdown */
.multi-select {
  position: relative;
}

.multi-select__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--vpm-purple-900, #341c4c);
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.multi-select__trigger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  min-height: 40px;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.375rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  text-align: left;
  outline: none;
}

.multi-select__trigger:hover {
  border-color: #d1d5db;
}

.multi-select__trigger:focus,
.multi-select--open .multi-select__trigger {
  outline: none;
  border-color: var(--vpm-purple-400, #a888b5);
  box-shadow: 0 0 0 3px rgba(149, 86, 158, 0.1);
}

.multi-select__chevron {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.multi-select--open .multi-select__chevron {
  transform: translateY(-50%) rotate(180deg);
}

.multi-select__placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
  padding: 0.125rem 0.375rem;
  line-height: 1.5;
}

/* Selected badges */
.multi-select__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.125rem 0.125rem 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vpm-purple-900, #341c4c);
  line-height: 1.4;
  animation: badgeFadeIn 0.15s ease;
}

@keyframes badgeFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.multi-select__badge-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.multi-select__badge-remove:hover {
  background: #e5e7eb;
  color: var(--vpm-purple-900, #341c4c);
}

.multi-select__badge-remove svg {
  width: 12px;
  height: 12px;
}

/* Dropdown panel */
.multi-select__dropdown {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.multi-select--open .multi-select__dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.multi-select__search {
  padding: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.multi-select__search-input {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-family: inherit;
  background: white;
  color: var(--vpm-purple-900, #341c4c);
  transition: border-color 0.15s ease;
}

.multi-select__search-input:focus {
  outline: none;
  border-color: var(--vpm-purple-400, #a888b5);
}

.multi-select__search-input::placeholder {
  color: #9ca3af;
}

.multi-select__options {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem;
}

.multi-select__options::-webkit-scrollbar {
  width: 6px;
}

.multi-select__options::-webkit-scrollbar-track {
  background: transparent;
}

.multi-select__options::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.multi-select__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-family: inherit;
  color: var(--vpm-purple-900, #341c4c);
  cursor: pointer;
  transition: background-color 0.1s ease;
  text-align: left;
  outline: none;
  user-select: none;
}

.multi-select__option:hover {
  background: #f3f4f6;
}

.multi-select__option--selected {
  background: #f9fafb;
}

.multi-select__option--hidden {
  display: none;
}

.multi-select__checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.multi-select__option--selected .multi-select__checkbox {
  background: var(--vpm-purple-900, #341c4c);
  border-color: var(--vpm-purple-900, #341c4c);
}

.multi-select__check-icon {
  width: 10px;
  height: 10px;
  color: white;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.multi-select__option--selected .multi-select__check-icon {
  opacity: 1;
}

.multi-select__empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #9ca3af;
}

/* Clear all trigger button */
.multi-select__clear {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  transition: color 0.15s ease;
}

.multi-select__clear:hover {
  color: var(--vpm-purple-900, #341c4c);
}

.multi-select--has-selection .multi-select__clear {
  display: inline-flex;
}

.multi-select__clear svg {
  width: 14px;
  height: 14px;
}

.multi-select--has-selection .multi-select__trigger {
  padding-right: 3.75rem;
}

/* Responsive */
@media (max-width: 640px) {
  .dropdown-filters__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dropdown-filters {
    padding: 1.25rem;
  }
}
