@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap");

body,
input,
button,
textarea,
select {
  font: 16px/1.56 "Noto Sans KR", AppleSDGothicNeo-Regular, "맑은 고딕",
    "Malgun Gothic", 나눔고딕, 돋움, Dotum, 굴림, Gulim, "Apple SD Gothic Neo",
    sans-serif;
  font-weight: 400;
  letter-spacing: -0.05px;
  font-style: normal;
  color: var(--Color-Black);
  word-break: break-all;
}

.basic-label-left {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 300px;
}

.basic-label-left label {
  min-width: 158px;
  font-size: 16px;
}

.input-icon {
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
}

.input-icon input {
  background: var(--surface-20);
  padding-right: 44px; /* 아이콘 공간 확보 */
}

/* basic label left + 아이콘 */
.basic-label-left .icon {
  position: absolute;
  right: 12px; /* 아이콘 위치 조정 */
  width: 24px;
  height: 24px;
  background-repeat: no-repeat; /* 반복 방지 */
}

.basic-label-left input[type="text"],
.basic-label-left input[type="tel"] {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--Color-Grey-40);
  padding: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  background: var(--Color-White);
}

input[id="date"] {
  cursor: pointer;
}

/* 달력 */
/* 캘린더 전체 스타일 */
.air-datepicker {
  display: block;
  position: static !important;
  font-family: "Arial", sans-serif;
  box-shadow: none !important;
  padding: 20px;
  width: 400px !important;
  background: var(--Surface-Surface-10) !important;
  box-sizing: border-box;
  height: auto !important;
  border: none !important;
}

.air-datepicker {
  transition: none !important;
  animation: none !important;
}

.air-datepicker.rows-4 {
  height: 352px;
}

.air-datepicker.rows-5 {
  height: 396px;
}

.air-datepicker.rows-6 {
  height: 440px;
}

/* 모바일 디바이스 넓이 대응 */
.air-datepicker.-is-mobile- {
  width: 350px !important;
}

.air-datepicker-nav {
  position: relative;
  justify-content: unset !important;
  /* height: 64px; */
  padding: 0 !important;
  border-bottom: unset !important;
  width: 100%;
  min-height: unset !important;
  margin-bottom: 16px;
}

.air-datepicker-nav:has(.year-view-title),
.air-datepicker-nav:has(.month-view-title) {
  /* position: fixed; */
  height: 64px;
  top: 0;
  left: 0;
  background: var(--Surface-Surface-10);
  border-bottom: 1px solid var(--Color-Grey-10) !important;
}

.air-datepicker-nav--title {
  padding: unset !important;
  cursor: unset !important;
  /* 년도선택, 월선택 disabled 버전 */
  /* pointer-events: none !important; */
  font-weight: 500;
}

.custom-back-btn,
.goto-today-button::before {
  filter: none !important;
}

.air-datepicker-nav--title:hover {
  background: unset !important;
}

/* 달력 좌우 이동 액션 버튼 */
.air-datepicker-nav--action {
  width: 24px;
}

.air-datepicker-nav--action.-disabled- {
  visibility: unset !important;
  pointer-events: none;
}

.air-datepicker-nav--action.-disabled-[data-action="prev"]:before {
  background-image: url("//image.chosun.com/cds/icon/disabled-calendar-prev.svg"); /* SVG URL */
}

.air-datepicker-nav--action.-disabled-[data-action="next"]:after {
  background-image: url("//image.chosun.com/cds/icon/disabled-calendar-next.svg"); /* SVG URL */
}

.air-datepicker-nav--action:hover,
.air-datepicker-nav--action:active {
  background: unset !important;
}

.air-datepicker-nav--action svg {
  display: none;
}

.air-datepicker-nav--action[data-action="next"]:after {
  content: "";
  position: absolute;
  transform: translateY(-50%);
  top: 50%;
  width: 24px;
  height: 24px;
  background-image: url("//image.chosun.com/cds/icon/calendar-next.svg"); /* SVG URL */
  background-size: contain; /* SVG 크기 조정 */
  background-repeat: no-repeat; /* 이미지 반복 제거 */
  cursor: pointer;
}

.air-datepicker-nav--action[data-action="prev"]:before {
  content: "";
  position: absolute;
  transform: translateY(-50%);
  top: 50%;
  width: 24px;
  height: 24px;
  background-image: url("//image.chosun.com/cds/icon/calendar-prev.svg"); /* SVG URL */
  background-size: contain; /* SVG 크기 조정 */
  background-repeat: no-repeat; /* 이미지 반복 제거 */
  cursor: pointer;
}

/* 요일 영역 */
.air-datepicker-body--day-names {
  margin: 0 -8px 0 -8px !important;
  height: 40px;
}

.air-datepicker-body--day-name {
  color: var(--Color-Black) !important;
  font-size: 14px !important;
  font-weight: 500;
}

/* 일자별 셀 */
.air-datepicker-body--cells.-days- {
  grid-auto-rows: 44px !important;
  /* column-gap: 28px; */
  /* row-gap: 28px; */
  margin: 0 -8px;
}

/* 오늘 */
.air-datepicker-cell.-day-.-current- {
  font-weight: 700;
  text-decoration: underline;
  color: var(--Color-Black) !important;
  text-decoration-thickness: 20%; /* 2.8px */
  text-underline-offset: auto;
  text-underline-position: from-font;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
  background: none;
}

.air-datepicker-cell.-day-.-current-.selected:after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--Color-Black);
  border-radius: 100px;
  z-index: -1;
}

.air-datepicker-cell.-day-.-current-.selected {
  color: var(--Color-White) !important;
  text-decoration: none;
}

.air-datepicker-cell.-day-.-current-.reset {
  font-weight: 700;
  text-decoration: underline;
  color: var(--Color-Black) !important;
  text-decoration-thickness: 20%; /* 2.8px */
  text-underline-offset: auto;
  text-underline-position: from-font;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
}
.air-datepicker-cell.-day-.-current-.reset::after {
  background: unset !important;
}

.air-datepicker-cell {
  font-size: 14px;
  color: var(--Color-Black);
}

/* 선택 불가한 일자 */
.air-datepicker-cell.-disabled- {
  color: var(--grey-40) !important;
}

/* 선택된 일자 */
.air-datepicker-cell.-selected-:not(.-day-.-current-) {
  color: var(--Color-White) !important;
  background: unset !important;
}

.air-datepicker-cell.-selected- {
  pointer-events: none;
}

.air-datepicker-body--cells.-months- {
  /* margin-top: 64px; */
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 48px;
  margin-top: 138px;
}

.air-datepicker-cell.-other-month- {
  pointer-events: none;
}

.air-datepicker-cell.-other-month-::after {
  background: none !important;
}

.air-datepicker-cell.-month-.-disabled- {
  pointer-events: none;
}

.air-datepicker-cell.-focus- {
  background: unset !important;
}

.air-datepicker-cell.-selected-:not(.-day-.-current-):after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--Color-Black);
  border-radius: 100px;
  z-index: -1;
}

/* 비활성화된 미래 날짜 스타일 */
.air-datepicker-cell.disabled-future-date {
  color: #ccc !important;
  background-color: #f8f9fa !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* 달력 하단 버튼 영역 */
.air-datepicker--buttons {
  display: flex;
  justify-content: center;
  border-top: unset !important;
  padding: unset !important;
  padding-top: 16px !important;
}

.air-datepicker-buttons {
  display: unset !important;
}

/* 취소 버튼 */
.air-datepicker-button.cancel-button {
  width: 100px;
  height: 36px;
  border-radius: 100px;
  border: 1px solid var(--Color-Grey-40);
  color: var(--Color-Grey-80);
  font-size: 14px;
  font-weight: 700;
  background: var(--Surface-Surface-30);
}

.air-datepicker-button.cancel-button:hover {
  background: var(--Surface-Surface-30) !important;
  color: var(--Color-Grey-80) !important;
}

/* 적용 버튼 */
.air-datepicker-button.apply-button {
  width: 100px;
  height: 36px;
  border-radius: 100px;
  background: var(--Color-Black);
  color: var(--Color-White);
  margin-left: 16px;
  font-size: 14px;
  font-weight: 700;
}

.air-datepicker-button.apply-button:hover {
  background: var(--Color-Black) !important;
  color: var(--Color-white) !important;
}

.air-datepicker-buttons .air-datepicker-button.-clear- {
  background-color: #f9f9f9;
  color: var(--Color-black);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

/* 오늘로 가기 버튼 */
.goto-today-button.hidden {
  display: none !important;
}

/* .goto-today-button {
  position: absolute;
  top: 23px;
  right: 20px;
  padding: 0;
  height: auto;
  font-size: 12px;
  color: var(--Color-Black);
} */

/* 오늘 날짜 버튼 정렬 수정 */
.goto-today-button {
  position: absolute !important;
  right: 10px !important;
  top: 80px !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  background-color: transparent !important;
  color: var(--Color-Black);
}

.goto-today-button:hover {
  color: var(--Color-black);
}

.goto-today-button span {
  position: relative;
  top: -2px;
}

.goto-today-button::before {
  content: "";
  display: inline-block;
  position: absolute;
  width: 20px;
  height: 20px;
  background-image: url("//image.chosun.com/cds/icon/refresh-black.svg"); /* SVG URL */
  background-size: contain;
  background-repeat: no-repeat;
  left: -12px;
}

.goto-today-button:hover {
  background: none;
}

/* 커스텀 연도 선택 뷰 */
/* 스크롤 가능한 연도 뷰 */
.scrollable-year-view {
  display: grid;
  overflow-y: auto;
  max-height: 355px;
  background: var(--surface-10);
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 48px;
  overscroll-behavior: contain;
  position: static;
  bottom: 20px;
  width: 100%;
  height: 100%;
}

.air-datepicker.rows-4 .air-datepicker-body--cells.-months- {
  margin-top: 108px;
}

.air-datepicker.rows-5 .air-datepicker-body--cells.-months- {
  margin-top: 0px;
}

.air-datepicker.rows-6 .air-datepicker-body--cells.-months- {
  margin-top: 152px;
}

.scrollable-year-view.contain-future-year {
  bottom: 0;
  max-height: 375px;
}

/* 커스텀한 연도 뷰로 대체되는 영역 */
.air-datepicker--content {
  padding: unset !important;
}

/* 연도선택뷰 타이틀, 월선택뷰 타이틀 */
.year-view-title,
.month-view-title {
  font-size: 16px;
  position: absolute;
  transform: translateX(-50%);
  left: 50%;
  pointer-events: none;
  color: var(--Color-Black);
}

/* 커스텀 연도뷰 진입 타이틀(데이뷰에서 연도) */
.custom-nav-title {
  color: var(--Color-Black);
}

.down-arrow {
  fill: var(--Color-Grey-80);
}

.custom-year-switch {
  cursor: pointer;
  padding: 4px 6px 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--grey-20);
  margin-left: 12px;
}

.custom-year-switch::after {
  position: relative;
  top: 1px;
}

.custom-year-switch svg {
  position: relative;
  top: 2px;
}

.year,
.month {
  cursor: default;
}

.year {
  margin-right: 8px;
  margin-left: 2px;
}

.month {
  margin-right: 12px;
  margin-left: 2px;
}

.custom-month-switch {
  padding: 10px 20px;
  cursor: pointer;
  padding: 4px 6px 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--grey-20);
}

.custom-month-switch svg {
  position: relative;
  top: 2px;
}

.air-datepicker-cell.-month-.-current- {
  color: var(--Color-black);
}

.month {
  padding: 10px 0;
}

/* 커스텀 연도 뷰 내 각 연도 태그 */
.year-item {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--Color-black);
}

.year-item:hover {
  background: unset !important;
}

.year-item.selected {
  color: var(--Color-white);
}

.year-item.selected:after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--Color-Black);
  border-radius: 100px;
  z-index: -1;
}

/* 연도뷰 및 월뷰에서 데이뷰로 되돌아오는 백버튼 */
.custom-back-btn {
  position: absolute;
  width: 20px;
  height: 20px;
  left: 20px;
  background-image: url("//image.chosun.com/cds/icon/prev-black.svg"); /* SVG URL */
  background-size: contain; /* SVG 크기 조정 */
  background-repeat: no-repeat; /* 이미지 반복 제거 */
  cursor: pointer;
}

/* 커스텀 연도 뷰 내 커스텀 스크롤 */
.scrollable-year-view::-webkit-scrollbar {
  width: 4px;
}

.scrollable-year-view::-webkit-scrollbar-track {
  background: var(--surface-10);
}

.scrollable-year-view::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-clip: content-box;
  background: var(--grey-40);
}

.scrollable-year-view::-webkit-scrollbar-thumb:hover {
  background-color: #a3a3a3;
}

.input-icon.date input.custom-datepicker-input:focus {
  outline: none;
  box-shadow: none;
  border: 1px solid var(--Color-Black);
}

.air-datepicker.from-second-datepicker .air-datepicker-button.apply-button {
  background: #e96917 !important;
}

.air-datepicker.from-second-datepicker
  .air-datepicker-cell.-selected-:not(.-day-.-current-):after {
  background: #e96917 !important;
}

.air-datepicker.from-second-datepicker .air-datepicker-cell.-day-.-current- {
  color: #e96917 !important;
}

.mypage-date-input.current-focus {
  border-color: var(--Color-Black) !important;
}

/* 모바일 대응 */
@media only screen and (max-width: 689px) {
  .air-datepicker {
    /* left: calc((100vw - 353px) / 2) !important; */
    width: calc(100vw - 64px) !important;
    max-width: 300px;
    min-width: 296px;
  }

  .goto-today-button span {
    display: none;
  }

  .goto-today-button::before {
    bottom: -18px;
  }

  body {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* day 호버 pc에서만 적용 */
@media (hover: hover) {
  .air-datepicker-cell:not(.-disabled-):not(.-selected-):not(
      .-other-month-
    ).-focus-:after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--grey-10);
    border-radius: 100px;
    z-index: -1;
  }

  .year-item:not(.selected):hover:after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--grey-10);
    border-radius: 100px;
    z-index: -1;
  }

  .air-datepicker-nav--action[data-action="prev"]:hover:before {
    background-image: url("//image.chosun.com/cds/icon/hover-calendar-prev.svg"); /* SVG URL */
  }

  .air-datepicker-nav--action[data-action="next"]:hover:after {
    background-image: url("//image.chosun.com/cds/icon/hover-calendar-next.svg"); /* SVG URL */
  }
}

/* .air-datepicker-nav--action.-focus- {
  visibility: unset !important;
  pointer-events: none;
} */
