/* GRDateRange —— 日期区间选择面板（js/date-range.js）。
   形态对齐 city-select.css 的 .gr-city-*：白卡 + 圆角 + 同一档投影；面板外那层**透明**遮罩只负责
   「点空白关闭」，不暗化页面（它是下拉面板，不是模态弹窗）。
   类名统一 gr-date- 前缀：这两个文件会被多页引用，别用 .date / .panel 这类通用名（站内踩过）。 */
.gr-date-mask {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: transparent
}

.gr-date-panel {
    position: absolute;
    z-index: 1201;
    box-sizing: border-box;
    /* 双月历：2 × 250px 月份块 + 16px 间距 + 左右各 12px 内边距（2026-10-19 用户：宽一些、显示两面日历） */
    width: 540px;
    padding: 12px 12px 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(25, 32, 40, .16);
    color: #313a46;
    font-size: 13px;
    font-family: inherit
}

.gr-date-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px
}

/* 快捷整期档位（只有按年计价才有：1 年 / 2 年 / 3 年）：点一次从开始日期回算整段租期，
   结束日期由 js/date-range.js 的 calendarUnitEnd 按日历周年算（与后端同一套语义）。
   与日历格区分：这里是描边 chip，选中态是浅红底 + 红字，不抢「选中日期」的实心红。
   短于最短租期的档位是 disabled（建外壳时按 state.minUnits 判，点它只会被补到最短租期）。 */
.gr-date-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px
}

.gr-date-quick button {
    height: 28px;
    padding: 0 16px;
    border: 1px solid #e6e8ec;
    border-radius: 7px;
    background: #fff;
    color: #55585f;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    cursor: pointer
}

.gr-date-quick button:hover {
    border-color: #e3242a;
    color: #e3242a
}

.gr-date-quick button.on {
    border-color: #e3242a;
    background: #fdeeed;
    color: #e3242a;
    font-weight: 700
}

.gr-date-quick button:disabled {
    border-color: #f0f1f3;
    background: #fafafa;
    color: #c6c9d0;
    cursor: default
}

/* 双月历：两个月份块并排，各自带月份标题 + 星期行 + 6×7 网格（js/date-range.js 的 monthBlock） */
.gr-date-months {
    display: flex;
    align-items: flex-start;
    gap: 16px
}

.gr-date-month {
    flex: 0 0 250px;
    width: 250px;
    min-width: 0
}

.gr-date-month-title {
    display: block;
    margin: 0 0 6px;
    color: #313a46;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums
}

.gr-date-title {
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums
}

.gr-date-nav {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e6e8ec;
    border-radius: 7px;
    background: #fff;
    color: #55585f;
    font-size: 15px;
    line-height: 1;
    cursor: pointer
}

.gr-date-nav:hover {
    border-color: #e3242a;
    color: #e3242a
}

.gr-date-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
    color: #9a9aa5;
    font-size: 12px;
    text-align: center
}

.gr-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px
}

.gr-date-day {
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #313a46;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    cursor: pointer
}

.gr-date-day:hover {
    background: #fdeeed
}

/* 上/下月的补位日与「早于今天」的禁用日：都要看得出「不可选」，但别用 tooltip 之类的额外提示 */
.gr-date-day.is-out,
.gr-date-day:disabled {
    color: #c6c9d0;
    cursor: default
}

.gr-date-day:disabled:hover {
    background: transparent
}

/* 今天：只描一圈品牌浅红，别和选中态抢视觉（选中是实心红） */
.gr-date-day.is-today {
    box-shadow: inset 0 0 0 1px #ffc9c4
}

.gr-date-day.in-range {
    border-radius: 0;
    background: #fdeeed
}

.gr-date-day.is-start,
.gr-date-day.is-end {
    border-radius: 7px;
    background: #e3242a;
    color: #fff;
    font-weight: 700
}

.gr-date-day.is-start:hover,
.gr-date-day.is-end:hover {
    background: #e3242a
}

.gr-date-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f2f3f5
}

.gr-date-hint {
    color: #9a9aa5;
    font-size: 12px;
    line-height: 1.5
}

/* 窄屏放不下两列：只留一个月（翻月按钮照常可用） */
@media(max-width:600px) {
    .gr-date-panel {
        width: min(272px, 92vw)
    }

    .gr-date-month {
        flex: 1 1 auto;
        width: auto
    }

    .gr-date-month+.gr-date-month {
        display: none
    }
}


/* 面板头部中间：月份标题 + 下面一行「共 N 天 · 计费 M 月」。
   租期按**计价单位**算出来（月租按整月、年租按整年），选之前就看得见会收几个月/几年。
   :empty 时不占位，按天计价且天数=单位数时这一行不显示。 */
.gr-date-head-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px
}

.gr-date-term {
    color: #e3242a;
    font-size: 11.5px;
    font-style: normal;
    font-weight: 700;
    font-variant-numeric: tabular-nums
}

.gr-date-term:empty {
    display: none
}

/* 起止日期（「开始 2026-10-21 → 结束 2027-10-20」）：只有日历高亮时看不出这一单租到哪天，
   月 / 年档位一次跨好几个月，必须显式写出来（2026-10-20 用户：「缺少开始日期等」）。
   还没选齐区间时是空串，不占位。 */
.gr-date-span {
    color: #313a46;
    font-size: 11.5px;
    font-style: normal;
    font-variant-numeric: tabular-nums
}

.gr-date-span:empty {
    display: none
}