/* ===============================================
   Choices.js Custom Styling für Boonsted
   Pfad: /assets/css/choices.css
   
   Diese Datei NACH choices.min.css laden!
   =============================================== */

/* ===============================================
   SELECT BOX (geschlossen)
   =============================================== */
.choices {
  margin-bottom: 0;
  font-family: inherit;
}

.choices__inner {
  background-color: var(--color-white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 60px;
  font-size: 16px;
  line-height: 1.6;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.choices__inner:hover {
  border-color: #d1d5db;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(9, 153, 141, 0.1);
}

/* Single Select - Text im geschlossenen Zustand */
.choices__list--single {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

.choices__list--single .choices__item {
  padding: 0;
  margin: 0;
  line-height: 1.5;
}

/* Placeholder Text */
.choices__placeholder {
  opacity: 0.5;
  color: var(--color-gray);
  padding: 0;
  margin: 0;
}

/* Input Field (für Suche) */
.choices__input {
  background-color: transparent;
  font-size: 16px;
  color: var(--color-dark);
  padding: 0;
  margin: 0;
  line-height: 1.5;
}

.choices__input::placeholder {
  color: #9ca3af;
}

.choices[data-type*="select-one"] .choices__input {
  padding: 0;
  margin: 0;
}

/* Dropdown Arrow */
.choices[data-type*="select-one"]::after {
  border-color: var(--color-gray) transparent transparent;
  margin-top: -2px;
  transition: all 0.2s ease;
}

.choices.is-open[data-type*="select-one"]::after {
  border-color: transparent transparent var(--color-gray);
  margin-top: -6px;
}

/* ===============================================
   DROPDOWN LISTE (geöffnet)
   =============================================== */
.choices__list--dropdown {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-top: 8px;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 100;
  background: var(--color-white);
}

.choices__list--dropdown .choices__list {
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

/* Dropdown Items */
.choices__list--dropdown .choices__item {
  padding: 14px 20px;
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: var(--color-accent-mint);
  color: var(--color-primary);
}

/* Search Input im Dropdown */
.choices__input--cloned {
  padding: 12px 20px !important;
  margin: 0 0 4px 0 !important;
  border-bottom: 1px solid #e5e7eb;
  font-size: 16px;
}

/* ===============================================
   MULTI-SELECT (für Partner)
   =============================================== */
.choices__list--multiple {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.choices__list--multiple .choices__item {
  background-color: var(--color-primary);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0;
  font-size: 14px;
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.choices__list--multiple .choices__item.is-highlighted {
  background-color: var(--color-primary-dark);
}

/* Remove Button (X) bei Multi-Select */
.choices__button {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0 0 0 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.choices__button:hover {
  opacity: 1;
}

/* ===============================================
   STATES
   =============================================== */

/* No Results */
.choices__item--choice.has-no-results {
  color: var(--color-gray);
  font-style: italic;
  padding: 14px 20px;
}

/* Loading State */
.choices.is-loading .choices__inner,
.choices.is-loading .choices__input {
  cursor: wait;
  opacity: 0.6;
}

/* Disabled State */
.choices.is-disabled .choices__inner {
  background-color: #f9fafb;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===============================================
   MOBILE OPTIMIERUNG
   =============================================== */
@media (max-width: 768px) {
  .choices__inner {
  padding: 16px 18px;
  min-height: 56px;
  font-size: 16px; /* iOS zoom vermeiden */
  }
  
  .choices__list--dropdown .choices__item {
  padding: 16px 18px;
  }
  
  .choices__input--cloned {
  padding: 14px 18px !important;
  }
}

/* ===============================================
   ANIMATION
   =============================================== */
.choices__list--dropdown {
  animation: choicesSlideIn 0.2s ease;
}

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

/* ===============================================
   ACCESSIBILITY
   =============================================== */
.choices__input:focus {
  outline: none;
}

.choices.is-focused {
  outline: none;
}

/* Scrollbar Styling für Dropdown */
.choices__list--dropdown .choices__list::-webkit-scrollbar {
  width: 8px;
}

.choices__list--dropdown .choices__list::-webkit-scrollbar-track {
  background: #f9fafb;
  border-radius: 4px;
}

.choices__list--dropdown .choices__list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.choices__list--dropdown .choices__list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}