/**
 * Поля с классами .custom-select.with-title / .custom-input.with-title:
 * иконка + подпись + значение в одну строку; rw18-селект не уходит под соседние блоки.
 * Префикс body — перекрывает edit_admins.css, profile.css, news.css и др.
 */

body .form-group-custom {
  position: relative;
  min-height: 55px;
  margin-bottom: 20px;
  z-index: 0;
}

body .form-group:has(.rw18-select-trigger[aria-expanded="true"]),
body .form-group-custom:has(.rw18-select-trigger[aria-expanded="true"]),
body label.custom-select.with-title:has(.rw18-select-trigger[aria-expanded="true"]) {
  position: relative;
  z-index: 80;
}

body .form-group-custom:last-child {
  margin-bottom: 0;
}

body .succesy_button {
  z-index: 5;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  right: 6px;
  width: 130px;
  top: 50%;
  transform: translateY(-50%);
  border-top: solid 1px rgba(255, 255, 255, 0.1);
  position: absolute;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 25px;
  transition: 0.2s;
  font-size: 11px;
  cursor: pointer;
}

body .succesy_button:hover {
  opacity: 0.7;
}

body .custom-select.with-title {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: default;
  background: var(--block-bg);
  z-index: 1;
  border: 1px solid var(--border-color);
  min-height: 55px;
  min-width: 90px;
  border-radius: 12px;
  margin-bottom: 0;
  padding: 8px 140px 8px 14px;
  box-sizing: border-box;
}

body .custom-select.with-title.with-button {
  padding-right: 140px;
}

body .custom-select.with-title > i {
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  order: 1;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  transform: none;
  pointer-events: none;
}

body .custom-select.with-title > span {
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  order: 2;
  max-width: 38%;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
  text-transform: none;
  letter-spacing: normal;
  padding: 0;
  background: transparent;
}

body .custom-select.with-title > .rw18-select-root {
  flex: 1 1 auto;
  min-width: 0;
  order: 3;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body .custom-select.with-title .rw18-select-trigger {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}

body .custom-select.with-title select:not(.rw18-select-native) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 12px;
  border: 0;
  margin: 0;
  width: 100%;
  min-height: 44px;
  padding: 12px 40px 12px 14px;
  font-weight: 500;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: 0.2s;
}

body .custom-select.with-title select:not(.rw18-select-native):focus {
  outline: none;
}

body .custom-input.with-title {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: text;
  background: var(--block-bg);
  margin-bottom: 0;
  z-index: 1;
  min-height: 55px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 8px 140px 8px 14px;
  box-sizing: border-box;
}

body .custom-input.with-title.with-button {
  padding-right: 140px;
}

body .custom-input.with-title > i {
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  order: 1;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  transform: none;
  pointer-events: none;
}

body .custom-input.with-title > span {
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  order: 2;
  max-width: 38%;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
  text-transform: none;
  letter-spacing: normal;
  padding: 0;
  background: transparent;
}

body .custom-input.with-title > input {
  flex: 1 1 auto;
  min-width: 0;
  order: 3;
  position: static;
  font-size: 14px;
  background-color: var(--input-bg);
  color: var(--text-color);
  min-height: 44px;
  height: auto;
  padding: 10px 14px;
  border: 0;
  margin: 0;
  width: auto;
  font-weight: 500;
  border-radius: 10px;
  box-sizing: border-box;
}

body .custom-input.with-title > input:focus {
  outline: none;
  background: var(--input-bg);
  box-shadow: 0 0 0 1px var(--primary-color);
}

body .custom-select.with-title:hover > i,
body .custom-input.with-title:hover > i {
  color: var(--color-red-light);
}
