/* assets/css/custom-dropdown.css — Sleek Luxury Searchable Select without ugly native scrollers */

.yk-custom-select-wrap {
  position: relative;
  width: 100%;
  font-family: inherit;
}

/* The display trigger button */
.yk-custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background-color: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  user-select: none;
}

.yk-custom-select-trigger:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background-color: rgba(0, 0, 0, 0.6);
}

.yk-custom-select-trigger.active {
  border-color: #D4AF37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
  background-color: rgba(5, 7, 11, 0.95);
}

.yk-custom-select-trigger .yk-placeholder {
  color: #94a3b8;
}

.yk-custom-select-trigger .yk-arrow {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #D4AF37;
  font-size: 0.75rem;
  pointer-events: none;
}

.yk-custom-select-trigger.active .yk-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu Panel */
.yk-custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 99999;
  background: #080c14;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 0.85rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.1);
  backdrop-filter: blur(16px);
  padding: 0.5rem;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.yk-custom-select-dropdown.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Search Box Inside Menu */
.yk-custom-select-search {
  position: relative;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.yk-custom-select-search input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #ffffff;
  font-size: 0.825rem;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.yk-custom-select-search input:focus {
  border-color: #D4AF37;
  background: rgba(255, 255, 255, 0.08);
}

.yk-custom-select-search input::placeholder {
  color: #64748b;
  font-size: 0.8rem;
}

.yk-custom-select-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #D4AF37;
  font-size: 0.75rem;
  pointer-events: none;
}

/* Options Container with Sleek, Subtle Dark Custom Scrollbar (NO ugly white native scrollbar) */
.yk-custom-select-options {
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 0.25rem 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.4) rgba(255, 255, 255, 0.03);
}

.yk-custom-select-options::-webkit-scrollbar {
  width: 5px;
}

.yk-custom-select-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.yk-custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.4);
  border-radius: 4px;
}

.yk-custom-select-options::-webkit-scrollbar-thumb:hover {
  background: #D4AF37;
}

/* Optgroup Header */
.yk-optgroup-label {
  padding: 0.45rem 0.65rem 0.25rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D4AF37;
  background: transparent;
  user-select: none;
  pointer-events: none;
}

/* Individual Option Item */
.yk-option-item {
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  color: #e2e8f0;
  border-radius: 0.45rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  user-select: none;
}

.yk-option-item:hover,
.yk-option-item.highlighted {
  background: rgba(212, 175, 55, 0.15);
  color: #ffffff;
  padding-left: 0.95rem;
}

.yk-option-item.selected {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.05));
  color: #D4AF37;
  font-weight: 600;
}

.yk-option-item.selected::after {
  content: '✓';
  font-weight: bold;
  color: #D4AF37;
  font-size: 0.8rem;
}

.yk-no-results {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Hidden original select remains accessible for form serialization & native validation */
.yk-native-hidden-select {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
}
