* {
  box-sizing: border-box;
}

.selected-field{
  background-color: #e6f2ff !important;
}

.custom-multiselect-wrapper {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.custom-multiselect-wrapper.open {
  border-color: #005bff;
}

.custom-multiselect-toggle {
  font-size: 14px;
  color: #1b1b1b;
  user-select: none;
}

.custom-multiselect-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 10px;
  z-index: 1000;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  display: none; /* <== оставить только один */
}

.custom-multiselect-wrapper.open .custom-multiselect-options {
  display: grid;
}

/*одиновный селект*/
.custom-singeselect-wrapper {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.custom-singeselect-wrapper.open {
  border-color: #005bff;
}

.custom-singeselect-toggle {
  font-size: 14px;
  color: #1b1b1b;
}

.custom-singeselect-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 8px;
  z-index: 1000;
  display: none; /* ✅ оставляем только это */
  flex-direction: column; /* ✅ вертикально */
  gap: 6px;
  max-height: 350px;
  overflow-x: auto;
  overflow-y: scroll;
}

.custom-singeselect-wrapper.open .custom-singeselect-options {
  display: flex; /* ✅ при открытии — вертикальный flex */
}

.custom-singeselect-options .custom-option {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  background: #f5f7f9;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-singeselect-options .custom-option:hover {
  background-color: #eaf1ff;
}

.custom-singeselect-options .custom-option.selected {
  background-color: #d6e8ff;
  font-weight: 600;
}


.custom-singeselect-options .custom-option {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  background: #f5f7f9;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-singeselect-options .custom-option:hover {
  background-color: #eaf1ff;
}

.custom-singeselect-options .custom-option.selected {
  background-color: #d6e8ff;
  font-weight: 600;
}
/*одиновный селект*/

.custom-option {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  background: #f5f7f9;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-option:hover {
  background-color: #eaf1ff;
}

.custom-option.selected {
  background-color: #d6e8ff;
  font-weight: 600;
}


#car-request-form {
  max-width: 1280px;
  margin: 0 auto;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* ⬆️ Верхняя часть формы (3 ряда + картинка) */
.top-group {
  display: flex;
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

.top-group .left {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-group .right {
  flex: 1;
  min-height: 100%;
  background: #f6f8fa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

/* ⬇️ Ряды после картинки */
.row {
  display: flex;
  gap: 12px;
  width: 100%;
}

/* ⬛ Поля */
.block {
  flex: 1;
  position: relative;
  background-color: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  padding: 1px 12px;
  min-height: 51px;
  transition: border-color 0.2s ease;
  display: flex;
  align-items: center;
}

.block:focus-within {
  border-color: #005bff;
}

.block select,
.block input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 18px;
  color: #1b1b1b;
  padding: 0;
  appearance: none;
  outline: none;
}

.block input::placeholder {
  color: #a0a0a0;
}

/* Поле с двумя input (год от/до) */
.double {
  display: flex;
  gap: 10px;
}

.double input {
  flex: 1;
}

/* 🔁 Адаптив */
@media (max-width: 1024px) {
  .top-group {
	flex-direction: column;
  }

  .top-group .right {
	min-height: 120px;
  }

  .row {
	flex-direction: column;
	gap: 10px;
  }
}
.block select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  line-height: 18px;
  padding-right: 24px;
  color: #1b1b1b;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg fill="%23666" height="10" viewBox="0 0 24 24" width="10" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  cursor: pointer;
}

.block select:focus {
  outline: none;
}

.block:focus-within {
  border-color: #005bff;
}

.block select:disabled {
  color: #aaa;
  cursor: not-allowed;
}
.toggle-params {
  font-size: 14px;
  font-weight: 500;
  color: #005bff;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.toggle-params:hover {
  color: #003fba;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.2s ease;
  cursor: pointer;
  overflow: visible;
}

.custom-select-wrapper:focus-within {
  border-color: #005bff;
}

.custom-select-toggle {
  font-size: 14px;
  color: #1b1b1b;
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  padding: 10px;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%; /* фикс ширины, не шире блока */
}

.custom-option {
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.custom-option:hover {
  background-color: #f2f2f2;
}

/* 🔥 Для поколений — с правильным скрытием */
#generation-wrapper .custom-singeselect-options {
  display: none; /* по умолчанию скрыто */
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

#generation-wrapper.open .custom-singeselect-options {
  display: grid; /* при открытии — grid */
}

#generation-wrapper .custom-option {
  position: relative;
  height: 150px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#generation-wrapper .custom-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#generation-wrapper .custom-option.selected {
  outline: 2px solid #005bff;
}

.big{min-width: 205%;}

.custom-singeselect-wrapper.selected-field .custom-singeselect-toggle {
  background-color: #e6f2ff;
}

.custom-singeselect-wrapper .custom-value-container {
  padding: 0;
  height: auto;
}

.custom-singeselect-wrapper .custom-value-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.custom-singeselect-wrapper .custom-value-input:focus {
  outline: none;
  border-color: #0073aa;
}