.custom-select {
  position: relative;
  display: inline-block;
}

.custom-select select {
  display: none; /* Скрываем оригинальный select */
}

.custom-select .select-selected {
  background-color: #F0EFEC;
  color: #424F4B;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="19" height="9" viewBox="0 0 19 9" fill="none"><path d="M1 1L9.5 8L18 1" stroke="%23424F4B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

.custom-select.select-green .select-selected {
  background-color: #1D5042;
  color: #E0FCE4;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="19" height="9" viewBox="0 0 19 9" fill="none"><path d="M1 1L9.5 8L18 1" stroke="%23E0FCE4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

.select-selected {
    display: flex;
    align-items: center;
    width: 100%;
    height: 45px;
    outline: none;
    border: none;
    border-radius: 10px;
    padding: 14px 50px 14px 16px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: right 20px center;
    transition: background-image 0.1s;
}

/* СТРЕЛКА ВНИЗ (по умолчанию) */
.select-selected {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="19" height="9" viewBox="0 0 19 9" fill="none"><path d="M1 1L9.5 8L18 1" stroke="%23424F4B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* СТРЕЛКА ВВЕРХ (по умолчанию) */
.select-selected.select-arrow-active {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="19" height="9" viewBox="0 0 19 9" fill="none"><path d="M18 8L9.5 1L1 8" stroke="%23424F4B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* СТРЕЛКА ВНИЗ (зеленая тема) */
.custom-select.select-green .select-selected {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="19" height="9" viewBox="0 0 19 9" fill="none"><path d="M1 1L9.5 8L18 1" stroke="%23E0FCE4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* СТРЕЛКА ВВЕРХ (зеленая тема) */
.custom-select.select-green .select-selected.select-arrow-active {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="19" height="9" viewBox="0 0 19 9" fill="none"><path d="M18 8L9.5 1L1 8" stroke="%23E0FCE4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

.custom-select .select-items.select-position-top {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 6px;
}

.select-items {
  position: absolute;
  background-color: #fff;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 2px 5px #575F39;
  display: none;
  color: #424F4B;
  border-radius: 5px;
  margin-top: 6px;
}

.select-items div {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.select-items div:last-child {
  border-bottom: none;
}

.select-items div:hover {
  background-color: #f5f5f5;
}

.select-items div.selected {
  background-color: #F0EFEC;
  font-weight: bold;
}

.select-show {
  display: block;
}

/* Стилизация скроллбара */
.select-items::-webkit-scrollbar {
  width: 8px;
}

.select-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.select-items::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.select-items::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/*===== МНОЖЕСТВЕННЫЙ ВЫБОР ============*/

.text-width-measurer {
  position: absolute;
  visibility: hidden;
  height: auto;
  width: auto;
  white-space: nowrap;
  font-family: Arial, sans-serif;
  font-size: 14px;
  padding: 10px 44px 10px 10px;
}

.custom-select.multiple .select-selected {
  padding: 10px 44px 10px 10px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.custom-select.multiple .select-selected .selected-text {
  color: #424F4B;
  font-size: 16px;
}
.custom-select.multiple.select-green .select-selected .selected-text {
  color: #E0FCE4;
  font-size: 16px;
}

.custom-select.multiple .select-selected .placeholder {
  color: #424F4B;
  font-style: italic;
}
.custom-select.multiple.select-green .select-selected .placeholder {
  color: #E0FCE4;
  font-style: italic;
}

.custom-select.multiple .select-items {
  position: absolute;
  background-color: #fff;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  border-top: none;
  border-radius: 5px;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 2px 5px #575F39;
  display: none;
}

.custom-select.multiple .select-items div {
  padding: 14px 10px;
  cursor: pointer;
  position: relative;
}

.custom-select.multiple .select-items div:last-child {
  border-bottom: none;
}

/* Убираем квадратный чекбокс */
.custom-select.multiple .select-items div:before {
  content: none; /* Скрываем квадрат */
}

/* Убираем галочку в квадрате */
.custom-select.multiple .select-items div.selected:after {
  content: none; /* Скрываем стандартную галочку */
}

/* Добавляем зеленый кружок с галочкой СПРАВА для выбранных опций */
.custom-select.multiple .select-items div.selected:before {
  content: "✓";
  position: absolute;
  right: 10px; /* Располагаем справа */
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: #7B9329; /* Зеленый цвет */
  border-radius: 50%; /* Круглая форма */
  color: white;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Для невыбранных опций ничего не показываем */
.custom-select.multiple .select-items div:not(.selected):before {
  content: none;
}

.custom-select.multiple .select-items div:hover {
  background-color: #f5f5f5;
}

.custom-select.multiple .select-show {
  display: block;
}

@media (max-width: 480px) {
  .custom-select.multiple .select-selected .selected-text {
    font-size: 14px;
  }
  .custom-select .select-selected {
    font-size: 14px;
  }
}