.xleb-forms-alert {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  border-radius: 5px;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); */
  /* opacity: 0.8; */
  /* padding: 10px 20px; */
  margin: 10px 0;
  color: var(--accentHoverColor);
}

.field-error {
  position: absolute;
  top: 100%;
  padding-top: var(--gap);
  line-height: var(--textSheightS);
  margin-top: var(--textStopS);
  margin-bottom: var(--textSbottomS);
  font-size: var(--textSsize);
  letter-spacing: var(--textSspacing);
  color: #e40d0d;
}

.xleb-forms-dialog {
  border-radius: 5px;
  box-shadow: 0 0 #0000, 0 0 #0000, 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 400px;
  margin: auto;
}

.xleb-forms-dialog>.inner {
  display: grid;
  padding: var(--gapX6);
}

.xleb-forms-dialog p {
  padding: 20px 0px;
}

.xleb-form {
  display: flex;
  flex-direction: column;
  gap: var(--gapX5);
  width: 100%;
  position: relative;
}

.input-box {
  display: flex;
  flex-direction: column;
  position: relative;
}

.input-box input[type="checkbox"] {
  max-width: fit-content;
}

.input-box:has(input[type="hidden"]) {
  display: none;
}

.xleb-form input[type=submit]:hover {
  background: var(--accentHoverColor);
}

.checkbox-group {
  margin-bottom: 15px;
}

.checkbox-item {
  margin-bottom: 5px;
  display: flex;
  gap: var(--gapX2);
}

.checkbox-item label {
  display: inline;
  font-weight: normal;
}

input[type="checkbox"] {
  display: grid;
  place-content: center;
}

input[type="checkbox"]::before {
  content: "";
  width: 15px;
  height: 8px;
  border: 1px solid var(--mainColor);
  border-width: 0 0 2px 2px;
  transform: scale(0) rotate(-45deg);
  transition: 120ms transform ease-in-out;
}

input[type="checkbox"]:checked::before {
  transform: scale(1) rotate(-45deg);
}

.radio-item {
  display: flex;
  gap: var(--gapX2);
  align-items: center;
}

input[type="radio"] {
  padding: unset !important;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-content: center;
}

input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  background-color: black;
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

.xleb-form .terms-field {
  display: flex;
  flex-direction: row;
  gap: var(--gapX3);
  align-items: center;
}

@keyframes trembling {
  0% {
    transform: translateX(-2px);
  }

  20% {
    transform: translateX(2px);
  }

  40% {
    transform: translateX(-2px);
  }

  60% {
    transform: translateX(2px);
  }

  80% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

.error-animation {
  animation: trembling 0.4s ease-in-out;
}

/* --- DaData AJAX Suggestions CSS --- */
.city-suggestions-container {
  position: relative; /* Needed for absolute positioning of the dropdown */
  margin-bottom: 1em; /* Or adjust as needed */
}

.city-suggestions-dropdown {
  position: absolute;
  left: 0;
  width: 100%;
  top: 100%;
  background-color: #ffffff;
  border: 1px solid var(--inputBg);
  border-top: none;
  max-height: 250px;
  max-width: 350px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  margin-top: var(--gapX2);
  border-radius: var(--gapX1);
}

.city-suggestions-dropdown.active {
  display: block; /* Show when active */
}

.suggestion-item {
  padding: var(--gap) var(--gapX4);
  cursor: pointer;
  font-size: var(--textSsize);
  border-bottom: 1px solid var(--blackOpacity100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: var(--textSheightT);
  margin: 0px;
}
.suggestion-item:last-child {
  border-bottom: none;
}

/* Highlight style for hover and keyboard navigation */
.suggestion-item:hover,
.suggestion-item.highlighted {
  background-color: var(--inputBg);
  color: var(--accentColor);
}

/* Style for the region part */
.suggestion-item .region {
  color: var(--contentOpacityColor);
  font-size: var(--textSsize);
  margin-left: var(--gapX2);
}

/* Loading/No Results messages */
.city-suggestions-dropdown .loading,
.city-suggestions-dropdown .no-results {
  padding: var(--gap) var(--gapX4);
  color: var(--blackOpacity200);
  font-size: var(--textSsize);
  text-align: center;
}