/*Chrome, Safari 등 WebKit 계열 브라우저는 autofill된 <input>에 대해 기본적으로 강제 배경색과 글자색을 적용*/
input:-webkit-autofill {
  background-color: #f7f7f7ff !important;
  -webkit-box-shadow: 0 0 0px 1000px #f8f9fa inset !important;
}

.custom__select,
.custom__input {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-bottom: 1px solid rgba(170, 170, 170, 1);
  cursor: pointer;
}

.custom__select.disabled,
.custom__input.disabled {
  cursor: default;
  /* border-bottom: 1px solid #d9d9d9; */
  opacity: 0.5;
}

.custom__select.none,
.custom__input.none {
  visibility: hidden;
}

.custom__input.active {
  border-bottom: 1px solid #006bea;
}

.custom__input.active .form__label,
.custom__select.active .form__label {
  color: #006bea;
}

.custom__select .form__label,
.custom__select .select__selected,
.custom__input .form__label,
.custom__input input {
  display: flex;
  align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  color: #757575;
  font-family: SamsungOne;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 145%; /* 26.1px */

  height: calc(100% - 3px);
  padding-bottom: 3px;
}
.custom__input input,
.custom__select .select__selected {
  color: #555;
}

/* transition 정상 적용 */
.custom__select:not(.no-transition) .form__label,
.custom__select:not(.no-transition) .select__selected,
.custom__input:not(.no-transition) .form__label,
.custom__input:not(.no-transition) input {
  transition: top 0.3s ease, font-size 0.3s ease;
}

/* transition 제거 */
.custom__select.no-transition .form__label,
.custom__select.no-transition .select__selected,
.custom__input.no-transition .form__label,
.custom__input.no-transition input {
  transition: none !important;
}

.custom__select.disabled .form__label,
.custom__input.disabled .form__label,
.custom__select.disabled .select__selected,
.custom__input.disabled .select__selected {
  /* color: #d9d9d9; */
}

.custom__select.disabled .required,
.custom__input.disabled .required {
  /* color: #beddff; */
}

.custom__select .form__label {
}

.custom__input input,
.custom__select input {
  padding: 12px 0;
  width: 100%;
  border: none;
  background-color: transparent;
  outline: none;
}

.custom__input.disabled input {
  display: none;
}

.custom__select .select__selected {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 글자가 작아지면서 올라가는 애니메이션  */
.custom__select.checked .form__label,
.custom__select.active .form__label,
.custom__input.checked .form__label,
.custom__input.active .form__label,
.custom__select.search.active .form__label,
.custom__select.search.checked .form__label {
  top: -70%;
  font-size: 12px;
}

/*label 없애기 버전*/
.custom__input.checked.no-label .form__label,
.custom__input.active.no-label .form__label,
.custom__select.search.active.no-label .form__label,
.custom__select.search.checked.no-label .form__label {
  top: 0;
  font-size: 18px;
  color: #757575;
}

.custom__select.checked.no-label .form__label,
.custom__select.active.no-label .form__label {
  display: none;
}

.custom__select.active .select__selected {
  opacity: 1;
}
.custom__select.checked .select__selected {
  opacity: 1;
}
.custom__input.filled.no-label .form__label {
  display: none;
}

.custom__select::after,
.custom__input.filled::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-70%);
  transition: transform 0.3s ease;
  width: 16px;
  height: 16px;
  background-image: url("/resources/icon/ico_dropdown.svg");
  background-repeat: no-repeat;
  background-size: contain;
}
.custom__select.disabled::after {
  background-image: url("/resources/icon/ico_dropdown-disabled.svg");
}

.custom__select.active::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom__select .select__options-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  overflow: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #fff;
  z-index: 10;
  margin-top: 5px;
}

/*select box 그림자 효과*/
.custom__select.active .select__options-wrapper {
  box-shadow: 0 0.28vw 0.69vw 0 rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.custom__select .select__options-wrapper.light-gray {
  background-color: #f7f7f7;
}

.custom__select .select__options {
  overflow-y: auto;
  max-height: 160px;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
/* Chrome, Edge, Safari용 커스텀 스크롤바 */
.custom__select .select__options::-webkit-scrollbar {
  width: 3px;
}

.custom__select .select__options::-webkit-scrollbar-track {
  background: transparent;
}

.custom__select .select__options::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.custom__select .select__options::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}

.custom__select .select__options::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.custom__select .select__options-wrapper li {
  height: 32px;
  display: flex;
  align-items: center;
  color: #555;
  font-family: SamsungOne;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 145%; /* 26.1px */
  padding: 0 16px;
}

.custom__select .select__options-wrapper li:hover {
  background-color: rgba(243, 243, 243, 1);
}
.custom__select .select__options-wrapper li + li {
  margin-top: 8px;
}
.custom__select .select__options-wrapper li.first {
  margin-top: 20px;
}
.custom__select .select__options-wrapper li.last {
  margin-bottom: 20px;
}

.custom__select:not(.search) .select__options-wrapper li:first-of-type {
  margin-top: 20px;
}
.custom__select:not(.search) .select__options-wrapper li:last-of-type {
  margin-bottom: 20px;
}

.custom__select.active .select__options-wrapper {
  grid-template-rows: 1fr;
}

.custom__select.search input {
  display: none;
  align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  color: #555;
  font-family: SamsungOne;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 145%; /* 26.1px */

  height: calc(100% - 3px);
  width: 100%;
  padding-bottom: 12px;

  transition: top 0.3s ease, font-size 0.3s ease;
}
.custom__select.search.no-label input {
  display: flex;
}

.custom__select.search.active::after {
  background-image: url("/resources/icon/ico_search.png");
  transform: translateY(-70%);
}

.custom__select.search.filled::after {
  background-image: url("/resources/icon/ico_cancel.png");
}
.custom__input.filled::after {
  background-image: url("/resources/icon/ico_cancel.png");
}

.custom__select.search.active input {
  display: flex;
}
.custom__select.search.checked input {
  display: flex;
}

.custom-checkbox {
  color: #000;
  font-family: SamsungOne;
  font-size: 16px;
  font-weight: 400;
  line-height: 100%; /* 16px */
}

.custom-checkbox.none {
  display: none;
}

.custom-checkbox .highlight {
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.custom-checkbox + .custom-checkbox {
  /* margin-top: 20px; */
}

.custom-checkbox input[type="checkbox"],
.custom-checkbox input[type="radio"] {
  display: none; /* 숨겨서 이미지로 대체 */
}

.custom-checkbox label {
  display: block;
  position: relative;
  padding-left: 30px; /* 이미지 너비만큼 띄움 */
  cursor: pointer;
  color: #222;
  line-height: 1.25;
}

.custom-checkbox label a {
  display: inline;
  text-decoration: underline;
  font-weight: 700;
}

.custom-checkbox input[type="checkbox"] + label::before {
  content: "";
  position: absolute;
  /* transform: translateY(-50%);
    top: 50%; */
  left: 0;
  width: 20px;
  height: 20px;
  /* background-image: url("/resources/icon/ico_checkbox-unchecked.png"); */
  background-size: cover;
  background-repeat: no-repeat;

  background-color: white;
  border-radius: 50%;
  border: 1px #555 solid;
  box-sizing: border-box;
}

.custom-checkbox input:disabled + label {
  opacity: 0.5;
  pointer-events: none;
}
.custom-checkbox input:disabled + label::before {
  opacity: 0.5;
  pointer-events: none;
}

.custom-checkbox input[type="radio"] + label::before {
  content: "";
  position: absolute;
  transform: translateY(-50%);
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  background-image: url("/resources/icon/ico_radio-unchecked.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.custom-checkbox input[type="checkbox"]:checked + label::before {
  background-image: url("/resources/icon/ico_checkbox-checked.png");

  background-color: #2189ff;
  border: #0000;
}

.custom-checkbox input[type="radio"]:checked + label::before {
  background-image: url("/resources/icon/ico_radio-checked.png");
}

@media only screen and (max-width: 1440px) {
  .custom__select,
  .custom__input {
    min-width: 15.28vw;
  }

  .custom__select .form__label,
  .custom__select .select__selected,
  .custom__input .form__label,
  .custom__input input {
    font-size: 1.25vw;

    height: calc(100% - 0.21vw);
    padding-bottom: 0.21vw;
  }

  .custom__input input,
  .custom__select input {
    padding: 0.83vw 0;
  }

  /* 글자가 작아지면서 올라가는 애니메이션  */
  .custom__select.checked .form__label,
  .custom__select.active .form__label,
  .custom__input.checked .form__label,
  .custom__input.active .form__label,
  .custom__select.search.active .form__label,
  .custom__select.search.checked .form__label {
    font-size: 0.83vw;
  }

  .custom__input.checked.no-label .form__label,
  .custom__input.active.no-label .form__label,
  .custom__select.search.active.no-label .form__label,
  .custom__select.search.checked.no-label .form__label {
    font-size: 1.25vw;
  }

  .custom__select::after,
  .custom__input.filled::after {
    right: 0.49vw;
    width: 1.11vw;
    height: 1.11vw;
  }

  .custom__select .select__options-wrapper {
    margin-top: 0.35vw;
  }

  /*select box 그림자 효과*/
  .custom__select.active .select__options-wrapper {
    box-shadow: 0 0.28vw 0.69vw 0 rgba(0, 0, 0, 0.2);
    border-radius: 0.42vw;
  }

  .custom__select .select__options {
    max-height: 11.11vw;
  }

  .custom__select .select__options-wrapper li {
    height: 2.22vw;
    font-size: 0.97vw;
    padding: 0 1.11vw;
  }

  .custom__select .select__options-wrapper li + li {
    margin-top: 0.56vw;
  }
  .custom__select .select__options-wrapper li.first {
    margin-top: 1.39vw;
  }
  .custom__select .select__options-wrapper li.last {
    margin-bottom: 1.39vw;
  }
  .custom__select:not(.search) .select__options-wrapper li:first-of-type {
    margin-top: 1.39vw;
  }
  .custom__select:not(.search) .select__options-wrapper li:last-of-type {
    margin-bottom: 1.39vw;
  }

  .custom__select.search input {
    font-size: 1.25vw;
    height: calc(100% - 0.21vw);
    padding-bottom: 0.83vw;
  }

  .custom-checkbox {
    font-size: 1.11vw;
  }

  .custom-checkbox + .custom-checkbox {
    /* margin-top: 1.39vw; */
  }

  .custom-checkbox label {
    padding-left: 2.08vw; /* 이미지 너비만큼 띄움 */
  }

  .custom-checkbox input[type="checkbox"] + label::before,
  .custom-checkbox input[type="radio"] + label::before {
    width: 1.38vw;
    height: 1.38vw;
  }
}

@media only screen and (max-width: 768px) {
  .custom__select,
  .custom__input {
    min-width: 100%;
  }
  .custom__select.none,
  .custom__input.none {
    visibility: hidden;
    display: none;
  }

  .custom__select .form__label,
  .custom__select .select__selected,
  .custom__input .form__label,
  .custom__input input {
    font-size: 5vw;
    height: 100%;
    padding-bottom: 0;
  }

  .custom__input input,
  .custom__select input {
    padding: 0;
  }

  /* 글자가 작아지면서 올라가는 애니메이션  */
  .custom__select.checked .form__label,
  .custom__select.active .form__label,
  .custom__input.checked .form__label,
  .custom__input.active .form__label,
  .custom__select.search.active .form__label,
  .custom__select.search.checked .form__label {
    font-size: 3.33vw;
    top: -60%;
  }

  .custom__input.checked.no-label .form__label,
  .custom__input.active.no-label .form__label,
  .custom__select.search.active.no-label .form__label,
  .custom__select.search.checked.no-label .form__label {
    font-size: 5vw;
  }

  .custom__select::after,
  .custom__input.filled::after {
    right: 1.94vw;
    width: 4.44vw;
    height: 4.44vw;
    transform: translateY(-50%);
  }

  .custom__select.search.active::after {
    transform: translateY(-50%);
    width: 5vw;
    height: 5vw;
  }

  .custom__select .select__options-wrapper {
    margin-top: 1.39vw;
  }

  /*select box 그림자 효과*/
  .custom__select.active .select__options-wrapper {
    box-shadow: 0 0.28vw 0.69vw 0 rgba(0, 0, 0, 0.2);
    border-radius: 1.67vw;
  }

  .custom__select .select__options {
    max-height: 51.11vw;
  }

  .custom__select .select__options-wrapper li {
    height: 9.72vw;
    font-size: 5vw;
    padding: 0 3.33vw;
  }

  .custom__select .select__options-wrapper li + li {
    margin-top: 1.67vw;
  }
  .custom__select .select__options-wrapper li.first {
    margin-top: 5vw;
  }
  .custom__select .select__options-wrapper li.last {
    margin-bottom: 5vw;
  }
  .custom__select:not(.search) .select__options-wrapper li:first-of-type {
    margin-top: 5vw;
  }
  .custom__select:not(.search) .select__options-wrapper li:last-of-type {
    margin-bottom: 5vw;
  }

  .custom__select.search input {
    font-size: 5vw;
    height: 100%;
    padding-bottom: 0;
  }

  .custom-checkbox {
    font-size: 3.89vw;
  }

  .custom-checkbox + .custom-checkbox {
    /* margin-top: 4.44vw; */
  }

  .custom-checkbox label {
    padding-left: 8.89vw; /* 이미지 너비만큼 띄움 */
    line-height: 150%;
    display: block;
  }

  .custom-checkbox input[type="checkbox"] + label::before,
  .custom-checkbox input[type="radio"] + label::before {
    width: 5.54vw;
    height: 5.54vw;
  }
}
