@charset "utf-8";

/* components/ui/calendar — 범용 Range Calendar (시각: reservation/calendar.css 와 동일, 클래스만 ui-calendar-*) */

.ui-calendar {
    width: 100%;
}

.ui-calendar-scroll {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.ui-calendar-wrap {
    position: relative;
    margin-bottom: 20px;
    min-height: 1px;
}

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

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

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

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

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

.ui-calendar-range-remove {
    cursor: pointer;
    font-weight: 700;
    opacity: 0.7;
}

.ui-calendar-range-remove:hover {
    opacity: 1;
}

.ui-calendar-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, 0.08);
    z-index: 20;
}

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

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

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

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

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

/* 월 스택: 원본과 동일 */
.ui-calendar-range {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
}

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

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

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

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

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

.ui-calendar-range .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;
}

.ui-calendar-range .day.is-start.has-next-range::after {
    content: "";
    position: absolute;
    left: 50%;
    right: -6px;
    top: 0;
    bottom: 0;
    background: #f3f3f3;
    z-index: 0;
}

.ui-calendar-range .day.is-start .day-inner {
    background: #111;
    color: #fff;
    border-radius: 50% 0 0 50%;
}

.ui-calendar-range .day.is-end.has-prev-range::before {
    content: "";
    position: absolute;
    left: -6px;
    right: 50%;
    top: 0;
    bottom: 0;
    background: #f3f3f3;
    z-index: 0;
}

.ui-calendar-range .day.is-end .day-inner {
    background: #111;
    color: #fff;
    border-radius: 0 50% 50% 0;
}

.ui-calendar-range .day.is-in-range {
    background: transparent;
}

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

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

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

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

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

.ui-calendar-range .day:hover:not(.is-disabled) .day-inner {
    background: #f3f4f6;
}

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

.ui-calendar-range .ui-calendar-days span.ui-calendar-empty {
    pointer-events: none;
    background: transparent;
}

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

.ui-calendar-btn-apply:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 쇼케이스(.ui-scope) 등 외부 스타일보다 pill·range 우선 적용 */
.ui-scope .ui-calendar-range .day.is-start .day-inner,
.ui-scope .ui-calendar-range .day.is-end .day-inner {
    background: #111;
    color: #fff;
}

.ui-scope .ui-calendar-range .day.is-start .day-inner {
    border-radius: 50% 0 0 50%;
}

.ui-scope .ui-calendar-range .day.is-end .day-inner {
    border-radius: 0 50% 50% 0;
}

.ui-scope .ui-calendar-range .day.is-start.has-next-range::after,
.ui-scope .ui-calendar-range .day.is-end.has-prev-range::before,
.ui-scope .ui-calendar-range .day.is-in-range::before {
    background: #f3f3f3;
}

.ui-scope .ui-calendar-range .day .day-inner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
