/* xfsel.css —— 全站统一下拉框（替代系统原生 select 弹出层）
   用法：页面引入 css + js，JS 会自动接管所有 <select> */

.xfsel{position:relative;display:block;width:100%;--xfsel-fs:16px}

.xfsel-native{position:absolute!important;width:1px;height:1px!important;margin:-1px;padding:0;
  border:0;opacity:0;pointer-events:none;clip:rect(0 0 0 0);overflow:hidden}

.xfsel-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;
  min-height:44px;padding:0 12px;border:1px solid #e4e7ec;border-radius:8px;background:#fff;
  color:#1d1d1f;font-size:var(--xfsel-fs);line-height:1.4;text-align:left;cursor:pointer;
  font-family:inherit;-webkit-appearance:none;appearance:none}
.xfsel-btn:hover{background:#fafafa}
.xfsel-btn[aria-expanded="true"]{border-color:#0b7285;background:#fff}
.xfsel-btn:focus-visible{outline:2px solid #0b7285;outline-offset:2px}

.xfsel-txt{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.xfsel-txt.is-empty{color:#69707d}

.xfsel-arw{flex:none;width:8px;height:8px;margin:-4px 2px 0 4px;border-right:1px solid #6b7280;
  border-bottom:1px solid #6b7280;transform:rotate(45deg)}

.xfsel-list{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 4px);margin:0;padding:4px;
  list-style:none;background:#fff;border:1px solid #e4e7ec;border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);max-height:52vh;overflow:auto;-webkit-overflow-scrolling:touch}

.xfsel-opt{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 8px;border-radius:6px;
  font-size:var(--xfsel-fs);color:#1d1d1f;cursor:pointer}
.xfsel-opt:hover{background:#f5f5f2}
.xfsel-opt[aria-selected="true"]{background:#eef6f8}
.xfsel-opt[aria-disabled="true"]{opacity:.4;cursor:default}
.xfsel-opt .ck{flex:none;margin-left:auto;color:#0b7285;font-style:normal;font-size:14px;visibility:hidden}
.xfsel-opt[aria-selected="true"] .ck{visibility:visible}

/* 配套：数字输入框去掉系统上下微调箭头（保留手输） */
input[type="number"]{-moz-appearance:textfield;appearance:textfield}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}

@media (prefers-reduced-motion:no-preference){
  .xfsel-list{transition:opacity .12s ease}
}
