/* Calendar */
.calendar {
  position: absolute;
  top: 50px;
  left: 0;
  width: 250px;
  height: auto;
  padding: 12px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #ccc;
  z-index: 99;
}

.calendar-wrapper {
  flex: 1;
  position: relative;
}

.calendar-input {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.calendar-input.input-box--s {
  padding: 0 26px 0 8px;
}

/* Calendar Header */
.calendar__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar__year-button {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.calendar__row-month {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.calendar__day-item--today {
  border: 1.5px solid #0099ff;
  background: #e6f4ff;
}

.calendar__month-button {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 18px;
}

.calendar__arrow {
  width: 24px;
  height: 24px;
}

/* Calendar Selector */
.calendar__month-selector,
.calendar__year-selector,
.calendar__day-list {
  display: grid;
  width: 100%;
  max-height: 216px;
  overflow-y: auto;
  scrollbar-width: none;
}

/* month-selector는 2열 */
.calendar__month-selector {
  grid-template-columns: repeat(2, 1fr);
}

/* year-selector는 1열 */
.calendar__year-selector {
  grid-template-columns: repeat(1, 1fr);
}

/* day-list는 7열 */
.calendar__day-list {
  grid-template-columns: repeat(7, 1fr);
}

/* Calendar Item (월/년/일) */
.calendar__month-item,
.calendar__year-item,
.calendar__day-item {
  display: block;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

/* 비활성화된 날짜 (expired date) */
.calendar__day-item--disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-gray);
}

/* 선택된 항목 공통 스타일 */
.calendar__month-item--selected,
.calendar__year-item--selected,
.calendar__day-item--selected {
  background-color: #0099ff;
  color: #fff;
}

/* 월, 연도 선택 버튼 추가 스타일 */
.calendar__month-item,
.calendar__year-item {
  font-size: 14px;
}

/* 요일 헤더 */
.calendar__weekday-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  align-items: center;
  background: white;
  padding: 8px 0;
}

.calendar__weekday {
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* 선택된 범위(range-selected) */
.calendar__day-item--range {
  background-color: #b1ddff;
  border-radius: 0;
}

/* 선택된 시작일 */
.calendar__day-item--start {
  color: #fff;
  border-radius: 8px 0px 0px 8px;
  background-color: #0099ff;
}

/* 선택된 종료일 */
.calendar__day-item--end {
  color: #fff;
  border-radius: 0px 8px 8px 0px;
  background-color: #0099ff;
}

/* 현재 월 날짜 */
.calendar__day-item--current {
  /* 현재 월은 특별한 스타일 없음 */
}

/* 이전/다음 월 날짜 */
.calendar__day-item--previous,
.calendar__day-item--next {
  color: #b1ddff;
}

/* 일(day) hover 스타일 */
.calendar__day-item:hover,
.calendar__day-item--previous:hover,
.calendar__day-item--next:hover {
  background-color: #b1ddff;
  color: #000;
}

/* 빈 칸 */
.calendar__day-item--empty {
  /* 비워진 칸에 별도 스타일 없음 */
}
