/* ==========================================================================
   出生时间（公历）滚轮选择器 —— 与 /gaiming/「生辰与基础信息」、/tools/wuxing/ 同一套交互
   触发框只读，点击弹出「年 / 月 / 日 / 时 / 分」五列滚轮；顶部实时回显，底部取消/确定。
   主题色由容器上的 --bp-accent / --bp-accent-dark / --bp-soft / --bp-soft-line 控制。
   ========================================================================== */

/* ---------- 触发框 ---------- */
.gdt-wrap { position: relative; display: flex; align-items: center; }
.gdt-trigger {
    width: 100%; cursor: pointer; padding-right: 2.25rem;
    font-family: inherit; color: #111827; background: transparent;
}
.gdt-trigger[readonly] { cursor: pointer; }
.gdt-trigger::placeholder { color: #c7cbd1; }
.gdt-arrow { position: absolute; right: .875rem; font-size: .875rem; color: #9ca3af; pointer-events: none; }
.gdt-trigger:focus { outline: 0; }

/* 行式表单里的下划线变体（与 nm-row 其它输入框同一视觉） */
.gdt-wrap.gdt-line { flex: 1 1 auto; min-width: 0; border-bottom: 1px dashed #e5e7eb; }
.gdt-wrap.gdt-line .gdt-trigger {
    border: 0; border-radius: 0; padding: 2px 26px 2px 0;
    font-size: 15px; line-height: 22px;
}
.gdt-wrap.gdt-line .gdt-arrow { right: 2px; font-size: 13px; color: #d1d5db; }
.gdt-wrap.gdt-line.on-focus,
.gdt-wrap.gdt-line:focus-within { border-bottom-color: var(--bp-accent, #db2777); }
.gdt-wrap.gdt-line:focus-within .gdt-arrow { color: var(--bp-accent, #db2777); }

/* ---------- 面板 ---------- */
.gdt-dtp { position: fixed; inset: 0; z-index: 100000; display: none; }
.gdt-dtp.on { display: block; }
.gdt-dtp-mask { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); animation: gdtFade .18s ease both; }
@keyframes gdtFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gdtPanelIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.gdt-dtp-panel {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(92vw, 340px); background: #fff; border-radius: 1rem; overflow: hidden;
    box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45); animation: gdtPanelIn .22s ease both;
}
.gdt-dtp-head { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem .625rem; }
.gdt-dtp-title { font-size: .9375rem; font-weight: 700; color: #1f2937; }
.gdt-dtp-close {
    width: 1.75rem; height: 1.75rem; border: 0; border-radius: 50%; background: #f3f4f6;
    color: #6b7280; font-size: 1rem; line-height: 1; cursor: pointer;
}
.gdt-dtp-close:hover { background: #e5e7eb; }
.gdt-dtp-info {
    text-align: center; font-size: 1rem; font-weight: 700; color: var(--bp-accent, #db2777);
    padding: .25rem 1rem .625rem; letter-spacing: .5px;
}
.gdt-dtp-info.empty { color: #9ca3af; font-weight: 400; font-size: .875rem; }
.gdt-dtp-wheels {
    position: relative; display: flex; height: 200px; padding: 0 .5rem;
    border-top: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6; box-sizing: content-box;
}
.gdt-dtp-col {
    position: relative; z-index: 1; flex: 1; min-width: 0; height: 100%;
    overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: auto;
}
.gdt-dtp-col::-webkit-scrollbar { display: none; }
.gdt-dtp-list { padding: 80px 0; }
.gdt-dtp-item {
    height: 40px; line-height: 40px; text-align: center; font-size: .9375rem; color: #b0b4bb;
    scroll-snap-align: center; transition: color .15s ease, font-size .15s ease;
}
.gdt-dtp-item.sel { color: #1f2937; font-weight: 700; font-size: 1rem; }
.gdt-dtp-band {
    position: absolute; left: .5rem; right: .5rem; top: 80px; height: 40px;
    background: var(--bp-soft, #fdf2f8); border-top: 1px solid var(--bp-soft-line, #fbd5e4);
    border-bottom: 1px solid var(--bp-soft-line, #fbd5e4); z-index: 0; pointer-events: none;
}
.gdt-dtp-wheels::before, .gdt-dtp-wheels::after {
    content: ""; position: absolute; left: 0; right: 0; height: 56px; z-index: 2; pointer-events: none;
}
.gdt-dtp-wheels::before { top: 0; background: linear-gradient(to bottom, #fff 12%, rgba(255, 255, 255, 0)); }
.gdt-dtp-wheels::after { bottom: 0; background: linear-gradient(to top, #fff 12%, rgba(255, 255, 255, 0)); }
.gdt-dtp-foot { display: flex; gap: .625rem; padding: .875rem 1rem 1rem; }
.gdt-dtp-btn {
    flex: 1; height: 2.75rem; border-radius: 9999px; border: 1px solid #e5e7eb; background: #fff;
    color: #4b5563; font-size: .9375rem; font-weight: 600; cursor: pointer; transition: all .18s ease;
    font-family: inherit;
}
.gdt-dtp-btn.ghost:hover { background: #f9fafb; }
.gdt-dtp-btn.primary { border-color: transparent; background: var(--bp-accent, #db2777); color: #fff; }
.gdt-dtp-btn.primary:hover { background: var(--bp-accent-dark, #be123c); }
body.gdt-lock { overflow: hidden; }
