/* _content/E9.WebAPP/Common/ComboBox.razor.rz.scp.css */
/* ComboBox 组件样式（CSS 隔离）
   结构参照 BootstrapBlazor AutoComplete：
   .e9-combobox > .combobox-input-wrapper(position:relative) > input.form-control + 悬浮图标 + .dropdown-menu
   可直接嵌入 EditForm / Table 等容器，宽度随父容器 100%。 */

.e9-combobox[b-wftzr37aa9] {
    position: relative;
    width: 100%;
}

.combobox-input-wrapper[b-wftzr37aa9] {
    position: relative;
    width: 100%;
}

.combobox-input[b-wftzr37aa9] {
    width: 100%;
    /* 为右侧悬浮的 ×/v 图标预留空间 */
    padding-right: 30px;
}

/* 下拉列表与组件同宽 */
.e9-combobox .combobox-menu[b-wftzr37aa9] {
    top: 100%;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    margin: 0.125rem 0 0;
    max-height: 320px;
    overflow-y: auto;
    box-sizing: border-box;
}

.e9-combobox.dropup .combobox-menu[b-wftzr37aa9] {
    top: auto;
    bottom: 100%;
    margin: 0 0 0.125rem;
}

/* 打开期间菜单被 JS portal 到 body（脱离表格裁剪/包含块），不再有 .e9-combobox 祖先，
   关键几何样式改由本类自带；CSS 隔离属性 [b-xxx] 仍在菜单元素上，规则继续生效 */
.combobox-menu-floating[b-wftzr37aa9] {
    max-height: 320px;
    overflow-y: auto;
    box-sizing: border-box;
    min-width: 0;
}

.combobox-item[b-wftzr37aa9] {
    cursor: pointer;
}

/* × 与 v 均为输入框内右侧的悬浮图标（无边框/无背景格子） */
.combobox-clear[b-wftzr37aa9],
.combobox-caret[b-wftzr37aa9] {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 5;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bs-secondary-color, #6c757d);
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1;
}

.combobox-clear:hover[b-wftzr37aa9],
.combobox-caret:hover[b-wftzr37aa9] {
    color: var(--bs-body-color, #212529);
}

/* 清除按钮默认隐藏；仅在「聚焦 + 有值 + 可编辑」时出现，替代下拉箭头 */
.combobox-clear[b-wftzr37aa9] {
    display: none;
}

.e9-combobox.is-focused.has-value .combobox-clear[b-wftzr37aa9] {
    display: flex;
}

.e9-combobox.is-focused.has-value .combobox-caret[b-wftzr37aa9] {
    display: none;
}

/* 禁用/只读：图标弱化且不可点 */
.e9-combobox:has(input:disabled) .combobox-caret[b-wftzr37aa9],
.e9-combobox:has(input[readonly]) .combobox-caret[b-wftzr37aa9] {
    cursor: default;
    opacity: 0.6;
}

.combobox-label[b-wftzr37aa9] {
    margin-bottom: 0.25rem;
    /* EditorForm Inline 弹性行中 label 不被压缩、不换行省略（如"模具编号"被挤成"模…"） */
    flex: 0 0 auto;
    white-space: nowrap;
}
/* _content/E9.WebAPP/Common/DateBox.razor.rz.scp.css */
/* datebox 日期输入框样式（CSS 隔离）
   结构：.datebox-wrap > input.datebox-input + button.datebox-clear + span.datebox-picker(内嵌 BB DatePicker)
   目标：外观与普通 form-control 输入框一致，右侧仅露出清除 × 与日历图标；
   BB 根全宽（日历面板锚点对齐输入框）且不接收事件，仅右侧 36px 隐形 input 与日历 bar 可点。 */

.datebox-wrap[b-ba3xo2oi1w] {
    position: relative;
    width: 100%;
}

.datebox-input[b-ba3xo2oi1w] {
    width: 100%;
    padding-right: 70px;
    background-color: var(--bs-body-bg, #fff);
}

/* 清除按钮（仅在有值时由组件渲染） */
.datebox-clear[b-ba3xo2oi1w] {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 36px;
    z-index: 5;
    width: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bs-secondary-color, #6c757d);
    background: transparent;
    border: 0;
    font-size: 1rem;
    line-height: 1;
}

.datebox-clear:hover[b-ba3xo2oi1w] {
    color: var(--bs-body-color, #212529);
}

/* 日历触发层：全宽覆盖仅作定位锚点容器，自身不接收事件，左侧点击/双击落到下层真实输入框 */
.datebox-picker[b-ba3xo2oi1w] {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

/* BB DatePicker/DateTimePicker 根：全宽作弹出面板定位锚点（面板对齐整个输入框），不挡事件 */
.datebox-picker[b-ba3xo2oi1w]  .date-picker,
.datebox-picker[b-ba3xo2oi1w]  .datetime-picker {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* BB 自带输入框不可见，收缩到右侧 36px 作为点击热区（不能用 display:none，否则面板无法打开） */
.datebox-picker[b-ba3xo2oi1w]  .date-picker-input,
.datebox-picker[b-ba3xo2oi1w]  .datetime-picker-input {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    pointer-events: auto;
}

/* 日历 bar 图标：仅视觉用途，必须 pointer-events:none —— BB 的开关委托只响应 .dropdown-toggle（BB input），
   点击穿透图标落到右缘 36px 透明 input 热区才会弹出面板（BB 原生亦为此机制）。
   BB 默认定位 left:0（图标原生在左），强制移到输入框右缘垂直居中 */
.datebox-picker[b-ba3xo2oi1w]  .date-picker-bar,
.datebox-picker[b-ba3xo2oi1w]  .datetime-picker-bar {
    top: 50%;
    left: auto;
    right: 10px;
    transform: translateY(-50%);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

.datebox-picker[b-ba3xo2oi1w]  .date-picker-bar .datetime-picker-input-icon,
.datebox-picker[b-ba3xo2oi1w]  .datetime-picker-bar .datetime-picker-input-icon {
    line-height: 1;
}
