/* Currency Converter - Choices.js custom styling */
.currency-choices .choices__inner {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background-color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.currency-choices .choices__input {
  background-color: transparent;
  padding: 0;
  font-size: 0.95rem;
  color: #1f2937;
}

.currency-choices .choices__list--single .choices__item {
  padding: 0;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.currency-choices .choices__list--dropdown,
.currency-choices .choices__list[aria-expanded] {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  margin-top: 4px;
  background-color: #fff !important;
  width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.currency-choices .choices__list--dropdown > * {
  width: 100% !important;
  flex-shrink: 0;
}

.currency-choices .choices__list--dropdown .choices__list {
  width: 100% !important;
  box-sizing: border-box !important;
  flex: 1 1 auto;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 !important;
  margin: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

/* Thin scrollbar for dropdown */
.currency-choices .choices__list--dropdown .choices__list::-webkit-scrollbar {
  width: 6px;
}

.currency-choices .choices__list--dropdown .choices__list::-webkit-scrollbar-track {
  background: transparent;
}

.currency-choices .choices__list--dropdown .choices__list::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 3px;
}

.currency-choices .choices__list--dropdown .choices__item {
  display: block !important;
  padding: 10px 12px !important;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: auto !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
}

.currency-choices .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: #f0f9fb;
  color: #1f2937;
}

.currency-choices .choices__list--dropdown .choices__input {
  background-color: #fff;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 12px;
}

.currency-choices .choices__list--dropdown .choices__input::placeholder {
  color: #9ca3af;
}

.currency-choices.is-focused .choices__inner {
  border-color: #87c0cd;
  box-shadow: 0 0 0 2px rgba(135, 192, 205, 0.3);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .currency-choices .choices__inner {
    background-color: #1a1f28;
    border-color: #4b5563;
  }

  .currency-choices .choices__input {
    color: #f3f4f6;
  }

  .currency-choices .choices__input::placeholder {
    color: #9ca3af;
  }

  .currency-choices .choices__placeholder {
    color: #9ca3af;
  }

  .currency-choices .choices__list--single .choices__item {
    color: #f3f4f6;
  }

  .currency-choices .choices__list--dropdown,
  .currency-choices .choices__list[aria-expanded] {
    background-color: #242a34 !important;
    border-color: #4b5563;
  }

  .currency-choices .choices__list--dropdown .choices__item,
  .currency-choices .choices__list[aria-expanded] .choices__item {
    color: #e5e7eb !important;
    background-color: #242a34;
  }

  .currency-choices .choices__list--dropdown .choices__item--selectable.is-highlighted,
  .currency-choices .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background-color: #1e2d32 !important;
    color: #fff !important;
  }

  .currency-choices .choices__list--dropdown .choices__input {
    background-color: #242a34 !important;
    color: #f3f4f6 !important;
    border-bottom: 1px solid #4b5563;
  }

  .currency-choices .choices__list--dropdown .choices__input::placeholder {
    color: #9ca3af !important;
  }

  .currency-choices .choices__list--dropdown .choices__list::-webkit-scrollbar-thumb {
    background-color: #4b5563;
  }

  .currency-choices .choices__list--dropdown .choices__list {
    scrollbar-color: #4b5563 transparent;
  }

  .currency-choices.is-focused .choices__inner {
    border-color: #87c0cd;
    box-shadow: 0 0 0 2px rgba(135, 192, 205, 0.2);
  }
}
