/* Унифицированные кастомные селекторы для всего сайта */

/* Контейнер селекта */
.SelectWrap {
  position: relative;
}

/* Кнопка селекта */
.SelectBtn {
  min-height: 40px;
  width: 100%;
  padding: 0 10px;
  background: #0f0a0b;
  border: 1px solid rgba(255, 80, 80, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #ffd6d6;
  box-shadow: inset 0 0 6px rgba(255, 60, 60, 0.18);
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  text-align: left;
}

.SelectBtn:hover {
  border-color: rgba(255, 80, 80, 0.5);
  box-shadow: 0 0 10px rgba(255, 90, 90, 0.25), inset 0 0 6px rgba(255, 60, 60, 0.25);
}

.SelectBtn:focus {
  outline: none;
  border-color: #ff7d7d;
  box-shadow: 0 0 12px rgba(255, 90, 90, 0.35), inset 0 0 6px rgba(255, 60, 60, 0.25);
}

.SelectBtn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.SelectLabel {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.SelectCaret {
  opacity: 0.8;
  display: inline-flex;
  color: #ff8080;
  transition: transform 0.3s ease;
}

.SelectBtn[aria-expanded="true"] .SelectCaret {
  transform: rotate(180deg);
}

/* Выпадающее меню */
.SelectWrap .menu-panel {
  background: #0f0a0b;
  border: 1px solid rgba(255, 80, 80, 0.35);
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(255, 60, 60, 0.25), inset 0 0 6px rgba(255, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  position: absolute;
  left: 0;
  margin-top: 4px;
  z-index: 9999;
  min-width: 100%;
  width: max-content;
  max-width: 400px;
}

/* Кастомный скроллбар */
.menu-panel::-webkit-scrollbar {
  width: 8px;
}

.menu-panel::-webkit-scrollbar-track {
  background: rgba(255, 80, 80, 0.1);
  border-radius: 4px;
}

.menu-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 80, 80, 0.4);
  border-radius: 4px;
}

.menu-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 80, 80, 0.6);
}

/* Пункты меню */
.menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  color: #ffd6d6;
  border-radius: 6px;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  white-space: nowrap;
}

.menu-item:hover {
  background: #1a0b0c;
  box-shadow: 0 0 12px rgba(255, 120, 120, 0.45);
  color: #fff;
}

.menu-item:active {
  transform: scale(0.98);
}

.menu-item.selected,
.menu-item.bg-\[#1a0b0c\] {
  background: #1a0b0c;
  font-weight: 600;
}

/* Скрываем нативные селекты */
.SelectWrap + select,
select.hidden {
  display: none !important;
}

/* Стили для невалидных полей */
.SelectBtn.invalid {
  border-color: #ff5050;
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.5), inset 0 0 8px rgba(255, 60, 60, 0.3);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Адаптивность */
@media (max-width: 640px) {
  .SelectBtn {
    min-height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }
  
  .menu-item {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .menu-panel {
    max-height: 250px;
    max-width: 100%;
  }
}

