@charset "utf-8";

/* 예약 전용 Range Calendar 스타일 (visit-stats 기반에서 booking- prefix로 분리) */

.booking-calendar-wrap {
    position: relative;
    margin-bottom: 20px;
}

.booking-calendar-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.booking-calendar-filter button {
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    background: #f1f1f1;
    font-size: 13px;
    cursor: pointer;
}

.booking-calendar-filter button.active {
    background: #2563eb;
    color: #fff;
}

.booking-btn-range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.booking-btn-range.is-active {
    background: #e6f0ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 6px 12px;
}

.booking-range-remove {
    cursor: pointer;
    font-weight: 700;
    opacity: .7;
}

.booking-range-remove:hover {
    opacity: 1;
}

.booking-date-range-pop {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 620px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
    z-index: 20;
}

.booking-date-range-pop.is-open {
    display: block;
}

.booking-range-head {
    margin-bottom: 14px;
}

.booking-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-range-inputs input[type="date"] {
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
}

.booking-range-days {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    display: inline-block;
}

.booking-range-calendar {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
}

.booking-month-title {
    font-weight: 600;
  display: flex;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1rem;
}

.booking-week,
.booking-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.booking-days {
    grid-auto-rows: 40px;
    gap: 8px;
}

.booking-week span {
    font-size: 12px;
    color: #9ca3af;
    padding: 6px 0;
}

/* range: 셀(.day) = 배경, 원형(.day-inner) = UI, 연결은 pseudo로 */
.booking-range-calendar .day {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.booking-range-calendar .day .day-inner {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 시작일: 다음이 range/end일 때만 오른쪽 bar (::after), gap까지 확장 → 연속 검정 바 */
.booking-range-calendar .day.is-start.has-next-range::after {
    content: '';
    position: absolute;
    left: 50%;
    right: -6px;
    top: 0;
    bottom: 0;
    background: #111;
    z-index: 0;
}

/* 시작일만 선택 / 체크인=체크아웃 당일 — 완전한 원 */
.booking-range-calendar .day.is-start:not(.has-next-range) .day-inner {
    background: #111;
    color: #fff;
    border-radius: 50%;
}

/* 구간과 이어질 때 — 왼쪽은 원, 오른쪽은 바와 맞닿게 */
.booking-range-calendar .day.is-start.has-next-range .day-inner {
    background: #111;
    color: #fff;
    border-radius: 50% 0 0 50%;
}

/* 종료일: 이전이 range/start일 때만 왼쪽 bar (::before), gap까지 확장 */
.booking-range-calendar .day.is-end.has-prev-range::before {
    content: '';
    position: absolute;
    left: -6px;
    right: 50%;
    top: 0;
    bottom: 0;
    background: #111;
    z-index: 0;
}

/* 종료일만 있는 경우는 없음(항상 시작 후) — 구간 끝: 오른쪽 원 */
.booking-range-calendar .day.is-end.has-prev-range .day-inner {
    background: #111;
    color: #fff;
    border-radius: 0 50% 50% 0;
}

.booking-range-calendar .day.is-end:not(.has-prev-range) .day-inner {
    background: #111;
    color: #fff;
    border-radius: 50%;
}

/* 중간: ::before로 좌우 확장해 gap에서도 끊기지 않게 — 검정 바 + 흰 글자 */
.booking-range-calendar .day.is-in-range {
    background: transparent;
}

.booking-range-calendar .day.is-in-range::before {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    top: 0;
    bottom: 0;
    background: #111;
    z-index: 0;
}

.booking-range-calendar .day.is-in-range .day-inner {
    background: transparent;
    color: #fff;
}

.booking-range-calendar .day.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.booking-range-calendar .day.booking-sunday:not(.is-start):not(.is-end):not(.is-in-range) .day-inner {
    color: #ef4444;
}

.booking-range-calendar .day.booking-holiday:not(.is-start):not(.is-end):not(.is-in-range) .day-inner {
    color: #ef4444;
}

.booking-range-calendar .day.booking-today:not(.is-start):not(.is-end):not(.is-in-range) .day-inner {
    box-shadow: inset 0 0 0 2px #b7b7b7;
}

/* range 밖 날짜만 연한 호버 */
.booking-range-calendar .day:hover:not(.is-disabled):not(.is-start):not(.is-end):not(.is-in-range) .day-inner {
    background: #f3f4f6;
}

.booking-range-calendar .day.is-start:hover .day-inner,
.booking-range-calendar .day.is-end:hover .day-inner {
    background: #333;
    color: #fff;
}

.booking-range-calendar .day.is-start.has-next-range:hover::after,
.booking-range-calendar .day.is-end.has-prev-range:hover::before {
    background: #333;
}

.booking-range-calendar .day.is-in-range:hover .day-inner {
    background: transparent;
    color: #fff;
}

.booking-range-calendar .day.is-in-range:hover::before {
    background: #333;
}

/* 빈 셀 (JS에서 span.booking-empty로 생성) */
.booking-range-calendar .booking-days span.booking-empty {
    pointer-events: none;
    background: transparent;
}

.booking-range-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.booking-btn-apply:disabled {
    opacity: .4;
    cursor: not-allowed;
}

