.eg-input,
.eg-textarea,
.eg-select {
  border-radius: 12px;
  border: 1px solid var(--do-grey);
  background-color: var(--do-white);
  width: 100%;
  padding: 1rem;
  color: var(--do-black);
  font-size: var(--font-16);
  font-weight: 400;
}

.eg-input,
.eg-select {
  height: 60px;
}

.eg-input::placeholder,
.eg-textarea::placeholder {
  color: inherit;
  font-weight: 300;
}

.eg-select {
  position: relative;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M16.25 6.875L10 13.125L3.75 6.875' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position-x: calc(100% - 1rem);
  background-position-y: 50%;
}

.eg-select::after {
  content: "";
  background-size: 20px;
  width: 20px;
  height: 20px;
  position: absolute;
  right: 0;
  top: 50%;
}

.eg-input:focus,
.eg-textarea:focus,
.eg-select:focus {
  border-color: var(--do-green);
}

.eg-input:focus-visible,
.eg-textarea:focus-visible,
.eg-select:focus-visible {
  outline: 0;
}

.eg-textarea {
  resize: none;
}

.eg-input-group {
  width: 100%;
  display: flex;
  align-items: start;
  gap: 1rem;
}

.eg-label-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 1rem;
}

.eg-radio-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.eg-radio-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eg-radio-group > label {
  font-size: var(--font-18);
  color: var(--do-black);
}

.eg-label {
  font-size: var(--font-14);
  color: var(--do-grey-2);
  font-weight: 400;
}

.eg-checkbox {
  cursor: pointer;
  margin: 0;
  min-width: 25px;
  min-height: 25px;
  border-radius: 5px;
  border: 1px solid var(--do-grey);
}

.eg-checkbox:focus {
  border-color: var(--do-green);
}

.eg-checkbox:checked {
  background-image: url("data:image/svg+xml, %3Csvg width='14px' height='14px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='SVGRepo_iconCarrier'%3E%3Cpath d='M4 12.6111L8.92308 17.5L20 6.5' stroke='%23a9171e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 14px;
  background-position: center;
}

.eg-radio {
  cursor: pointer;
  margin: 0;
  min-width: 25px;
  min-height: 25px;
  border-radius: 100%;
  border: 1px solid var(--do-grey);
}

.eg-radio:focus {
  border-color: var(--do-green);
}

.eg-radio:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13' fill='none'%3E%3Cpath d='M6.50684 12.5C9.82054 12.5 12.5068 9.81371 12.5068 6.5C12.5068 3.18629 9.82054 0.5 6.50684 0.5C3.19313 0.5 0.506836 3.18629 0.506836 6.5C0.506836 9.81371 3.19313 12.5 6.50684 12.5Z' fill='%2357ae5b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 13px;
  background-position: center;
}

.input-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.error-message {
  display: none;
  color: var(--ar-red);
}

.eg-select-dropdown {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--do-grey);
  height: 60px;
  cursor: pointer;
  position: relative;
  z-index: 5;
}

.eg-select-dropdown:focus {
  box-shadow: 0 0 0 0.1rem var(--do-green);
}

.eg-select-dropdown.active {
  border: none;
  border-radius: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-top: 1px solid var(--do-grey);
  border-left: 1px solid var(--do-grey);
  border-right: 1px solid var(--do-grey);
}

.eg-select-dropdown > .heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.eg-select-dropdown > .heading > p {
  color: rgba(0, 0, 0, 0.9);
  font-size: var(--font-16);
  font-weight: 500;
  line-height: normal;
}

.eg-select-dropdown > .heading > svg {
  transition: rotate 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.eg-select-dropdown.active > .heading > svg {
  rotate: 180deg;
}

.eg-select-dropdown > .content {
  background: var(--do-white);
  position: absolute;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  top: 100%;
  left: -1px;
  border-left: 1px solid var(--do-grey);
  border-right: 1px solid var(--do-grey);
  border-bottom: 1px solid var(--do-grey);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 0 1rem 0.5rem 1rem;
  width: calc(100% + 2px);
  z-index: 5;
  display: flex;
  flex-direction: column;
}

.eg-select-dropdown.active > .content {
  opacity: 1;
  pointer-events: all;
}

.eg-select-dropdown.active > .content > p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--do-black);
  font-size: var(--font-16);
  font-weight: 500;
  letter-spacing: -0.12px;
  width: 100%;
  transition: color 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
  padding-bottom: 1rem;
}

.eg-select-dropdown.active > .content > p:last-child {
  padding-bottom: 0.5rem;
}

.eg-select-dropdown.active > .content > p:hover {
  color: var(--do-green);
}

@media (max-width: 576px) {
  .eg-input-group {
    flex-direction: column;
  }
}
