/**
 * DateSinglePicker 单月日历单日选择公共组件样式（方案8提取，dsp- 前缀）
 * 与 date-range-picker / datetime-range-picker 风格一致
 */

/* ---------- 根容器（筛选框 + 悬浮面板定位锚点） ---------- */
.dsp-root {
    position: relative;
    display: inline-block;
}

/* ---------- 筛选框（触发器） ---------- */
.dsp-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 365px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #d9e1ec;
    border-radius: 6px;
    background: #fff;
    color: #3d4757;
    font-size: 13px;
    cursor: pointer;
    box-sizing: border-box;
    text-align: left;
}

.dsp-field:hover {
    border-color: #b9c6d8;
}

.dsp-field.dsp-open {
    border-color: #007bff;
}

.dsp-ico {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    background-color: #8a94a6;
    -webkit-mask: url("../images/icons/calendar.svg") center/contain no-repeat;
    mask: url("../images/icons/calendar.svg") center/contain no-repeat;
}

.dsp-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsp-caret {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    background-color: #8a94a6;
    -webkit-mask: url("../images/icons/caret-down.svg") center/contain no-repeat;
    mask: url("../images/icons/caret-down.svg") center/contain no-repeat;
    transition: transform .2s;
}

.dsp-field.dsp-open .dsp-caret {
    transform: rotate(180deg);
}

/* ---------- 悬浮面板（0.3s 过渡，与方案8一致：class 驱动 opacity/translateY transition） ---------- */
.dsp-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 990; /* 悬浮于页面内容之上，不占据文档流 */
}

.dsp-panel {
    position: relative;
    width: 320px;
    margin: 0;
    padding: 14px 16px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(30, 41, 59, .06);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .3s, transform .3s;
}

.dsp-pop-in .dsp-panel {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 月份导航头 ---------- */
.dsp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dsp-title {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
}

.dsp-nav {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: none;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.dsp-nav:hover {
    background: #f1f5f9;
    color: #1f2937;
}

/* ---------- 星期表头 ---------- */
.dsp-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.dsp-week span {
    height: 24px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    line-height: 24px;
}

/* ---------- 日期网格 ---------- */
.dsp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dsp-cell {
    height: 32px;
    text-align: center;
    font-size: 13px;
    color: #3d4757;
    line-height: 32px;
    border-radius: 6px;
    cursor: pointer;
}

.dsp-cell:hover {
    background: #f1f5f9;
}

.dsp-cell.dsp-muted {
    color: #b6c0cf;
}

.dsp-cell.dsp-today {
    color: #007bff;
    font-weight: 600;
}

.dsp-cell.dsp-today.dsp-sel {
    color: #fff;
}

.dsp-cell.dsp-sel {
    background: #007bff;
    color: #fff;
    font-weight: 600;
}

/* ---------- 底栏：当前值 + 取消/确定 ---------- */
.dsp-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

.dsp-value {
    flex: 1 1 auto;
    font-size: 12px;
    color: #64748b;
}

.dsp-footbtns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsp-btn-cancel {
    padding: 4px 12px;
    border: 1px solid #d9e1ec;
    border-radius: 6px;
    background: #fff;
    color: #6b7686;
    font-size: 13px;
    cursor: pointer;
}

.dsp-btn-cancel:hover {
    border-color: #007bff;
    color: #007bff;
}

.dsp-btn-ok {
    padding: 4px 12px;
    border: 1px solid #007bff;
    border-radius: 6px;
    background: #007bff;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.dsp-btn-ok:hover {
    background: #0069d9;
}
