@import "jquery-ui.css";

$margin-bottom: 10px;
$button-margin-left: 10px;
$button-bg-color: #2271b1;
$button-bg-hover: #1e5a8c;

// Основные стили
.wrap {
  // Здесь можно добавить стили для основного контейнера
}

h1 {
  text-align: center;
}

.base-selection {
  margin-bottom: 20px;
  padding-left: 10px;
}

.select-button-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;

  select,
  input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
}

button {
  padding: 10px 15px;
  margin: 8px;
  background-color: $button-bg-color;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;

  &:hover {
    background-color: $button-bg-hover;
  }
  &:hover:not(:disabled) {
    background-color: darken(#007bff, 10%);
  }

  &:disabled {
    background-color: #bdbdbd;
    cursor: not-allowed;
    opacity: 0.7;
  }
}

.modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 5px;
  width: 300px;
  position: relative;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
}

.error-message {
  color: red;
  font-size: 14px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.success-message {
  color: green;
  font-size: 14px;
  margin-top: 10px;
}

.select-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: $margin-bottom;

  .field-select {
    flex: 1;
  }

  .remove-select {
    margin-left: $button-margin-left;
    background: transparent; // Убираем заливку
    border: none; // Убираем границу
    color: inherit; // Унаследовать цвет текста
    cursor: pointer; // Курсор указателя
  }
}

#add-select {
  background-color: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;

  &:hover {
    color: darkblue;
  }

  &:focus {
    outline: none;
  }
}

.field-list {
  display: flex;
  flex-direction: column;
  gap: 10px; /* Расстояние между полями */
}

.field-wrapper {
  display: flex;
  align-items: center;
  margin-left: 10px;
  gap: 10px; /* Устанавливаем расстояние между элементами */
}

.field-wrapper label {
  margin-right: 10px; /* Расстояние между меткой и селектом */
}

.field-select-dasha {
  all: unset !important;
  flex: 1;
  font-size: 14px !important;
  line-height: 2 !important;
  color: #2c3338 !important;
  border: 0.5px solid #8c8f94 !important;
  box-shadow: none !important;
  border-radius: 3px !important;
  padding: 0 24px 0 8px !important;
  min-height: 30px !important;
  max-width: 25rem !important;
  -webkit-appearance: none !important;
  background: #FFFFFF !important;
  background-size: 16px 16px !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  width: 100px !important;
}

.field-select-dasha:disabled {
  background: #FFFFFF !important;
  background-size: 16px 16px!important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

.field-wrapper {
  margin-bottom: 10px !important;
}

#loader {
  display: none;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#loader.success {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  color: green;
  font-size: 24px;
  width: 30px;
  height: 30px;
}

#loader.error {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  color: red;
  font-size: 24px;
  width: 30px;
  height: 30px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#progress-container {
  width: 100%;
  background-color: #f3f3f3;
}

#progress-bar {
  height: 30px;
  background-color: #4caf50;
  text-align: center;
  line-height: 30px; /* Центрирование текста по вертикали */
  color: white;
}
.close-button-export{
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
}
.loader {
  border: 4px solid rgba(255, 255, 255, 0.3); /* Цвет фона */
  border-top: 4px solid #3498db; /* Цвет верхней части */
  border-radius: 50%;
  width: 20px; /* Ширина загрузчика */
  height: 20px; /* Высота загрузчика */
  animation: spin 1s linear infinite; /* Анимация вращения */
  margin-left: 10px; /* Отступ слева от кнопки */
  display: inline-block; /* Отображение в одну линию с кнопкой */
}

#filters-container {
  margin-left: 10px;

  .filter-wrapper {
    margin-bottom: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    .filter-label {
      margin-bottom: 8px;
      font-weight: 600;
      width: 100%;
    }

    .form-group {
      margin-bottom: 12px;

      label {
        display: block;
        margin-bottom: 4px;
      }

      input,
      select {
        min-width: 200px;
        max-width: 100%;
        box-sizing: border-box;
      }
    }
  }
}