/**
 * 滚轮日期时间选择器样式
 * 配色对齐站点主题：主色 #9b59b6 → #8e44ad（紫），辅色 #6c3483，文字 #333/#666
 */

.wheel-picker {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
}

.wheel-picker.open {
    display: block;
}

.wheel-mask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .22s ease;
}

.wheel-picker.show .wheel-mask {
    opacity: 1;
}

.wheel-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .26s cubic-bezier(.22, .61, .36, 1);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.wheel-picker.show .wheel-panel {
    transform: translateY(0);
}

/* ---------- 顶栏 ---------- */
.wheel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 14px;
    border-bottom: 1px solid #f2f2f2;
}

.wheel-btn {
    font-size: 15px;
    line-height: 1;
    padding: 8px 2px;
    background: none;
    border: 0;
    cursor: pointer;
}

.wheel-btn-cancel {
    color: #666;
}

.wheel-btn-done {
    color: #8e44ad;
    font-weight: 600;
}

.wheel-btn-done:active {
    opacity: .6;
}

/* 公历 / 农历 分段开关 */
.wheel-tabs {
    display: flex;
    align-items: center;
    background: #f2f2f2;
    border-radius: 999px;
    padding: 3px;
}

.wheel-tab {
    min-width: 62px;
    text-align: center;
    font-size: 14px;
    line-height: 1;
    padding: 7px 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #666;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.wheel-tab.active {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
    font-weight: 600;
}

/* ---------- 列区 ---------- */
.wheel-cols {
    position: relative;
    display: flex;
    height: 220px;
    overflow: hidden;
}

.wheel-col {
    flex: 1 1 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    text-align: center;
}

.wheel-col::-webkit-scrollbar {
    display: none;
}

.wheel-item {
    height: 44px;
    line-height: 44px;
    font-size: 15px;
    color: #999;
    white-space: nowrap;
    scroll-snap-align: center;
    transition: color .15s ease, font-size .15s ease;
    user-select: none;
}

.wheel-item.active {
    color: #8e44ad;
    font-weight: 700;
    font-size: 17px;
}

/* 选中行上下两条细线 */
.wheel-indicator {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 44px;
    margin-top: -22px;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    pointer-events: none;
}

/* 列标题：年 月 日 时 分 */
.wheel-units {
    display: flex;
    padding: 6px 0 10px;
    border-top: 1px solid #f7f7f7;
}

.wheel-unit {
    flex: 1 1 0;
    text-align: center;
    font-size: 12px;
    color: #bbb;
}

/* 关闭时禁用滚动，避免背景跟着滚 */
body.wheel-lock {
    overflow: hidden;
}

@media (min-width: 768px) {
    .wheel-panel {
        left: 50%;
        right: auto;
        bottom: 50%;
        width: 420px;
        border-radius: 14px;
        transform: translate(-50%, 50%) scale(.96);
        opacity: 0;
        transition: transform .2s ease, opacity .2s ease;
    }

    .wheel-picker.show .wheel-panel {
        transform: translate(-50%, 50%) scale(1);
        opacity: 1;
    }
}

/* 打印时强制排除：滚轮 DOM 会一直留在页面上（用完只是隐藏），
   不加这条，部分浏览器的打印会把浮层内容（几百个年月日选项）排到报告末尾 */
@media print {
    .wheel-picker {
        display: none !important;
    }
}
