/* Customer picker module-owned styles.
 * Host layout may place .customer-picker, but internals and dismissal layer are owned here.
 */
.customer-picker{display:grid;gap:0;position:relative}
.customer-picker-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:10px 12px;border:1px solid #ccd7dd;border-radius:8px;background:#fff;color:inherit;text-align:left}
.customer-picker-trigger:focus-visible{outline:3px solid #65c6a7;outline-offset:3px}
.customer-picker-chevron{color:var(--muted);font-size:18px;line-height:1}
.customer-picker-panel{display:grid;gap:8px;padding:9px;margin-top:5px;border:1px solid #ccdbea;border-radius:9px;background:#f8fbff;box-shadow:0 6px 16px #10283c14}
.customer-picker-panel[hidden]{display:none}
.customer-picker-search-row{display:flex;align-items:center;gap:6px;width:100%}
.customer-picker-search-row input#cart-customer-search{flex:1;min-width:0;min-height:38px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;font-size:13px}
.customer-picker-add{flex:0 0 38px;width:38px;height:38px;min-height:38px;padding:0;display:inline-flex;align-items:center;justify-content:center;color:#1f63e9;background:#eef4ff;border:1px solid #d8e6fb;border-radius:7px;font-size:20px;font-weight:700;line-height:1;cursor:pointer;transition:all .15s ease}
.customer-picker-add:hover{background:#e2edff;border-color:#9fc0f5}
.customer-picker-panel input{min-height:38px;padding:8px 10px}
.customer-picker-options{display:grid;gap:4px;max-height:190px;overflow:auto}
.customer-picker-option{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:40px;padding:7px 9px;border:1px solid transparent;border-radius:7px;background:#fff;color:inherit;text-align:left}
.customer-picker-option:hover,.customer-picker-option:focus-visible,.customer-picker-option.selected{border-color:#a9c5ee;background:#eef5ff;color:#1f63e9}
.customer-picker-option span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-picker-option small{flex:0 0 auto;font-size:11px}
.customer-picker-empty{padding:8px;color:var(--muted);font-size:12px;text-align:center}

html[data-ui-style="midnight"] .pos-selling-shell .customer-picker-trigger,
html[data-ui-style="midnight"] .pos-selling-shell .customer-picker-panel,
html[data-ui-style="midnight"] .pos-selling-shell .customer-picker-option{
  background:#112b36;color:#e7f1f3;border-color:#294652
}

@media (max-width:640px){
  .pos-topbar-row1 .customer-picker{
    display:inline-flex!important;flex:1 1 auto!important;min-width:0!important;max-width:none!important;
    position:relative!important;z-index:10050!important
  }
  .pos-topbar-row1 .customer-picker-trigger{
    display:inline-flex!important;align-items:center!important;gap:5px!important;width:100%!important;
    height:36px!important;min-height:36px!important;padding:0 8px!important;border-radius:8px!important;
    border:1px solid #2d5b73!important;background:#0b2b3c!important;color:#f7fbff!important;
    font-size:13px!important;font-weight:500!important;overflow:hidden!important;text-overflow:ellipsis!important;
    white-space:nowrap!important;cursor:pointer!important
  }
  .pos-topbar-row1 .customer-picker-trigger span{
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important
  }

  html .pos-selling-shell:not(.pos-edit-active) .customer-picker-panel,
  html .customer-picker-panel{
    position:fixed!important;top:60px!important;left:12px!important;right:12px!important;width:auto!important;
    max-width:min(420px,calc(100vw - 24px))!important;margin:0 auto!important;max-height:min(480px,75dvh)!important;
    border-radius:16px!important;box-shadow:0 16px 40px rgba(0,0,0,.25)!important;
    border:1px solid #dce4ee!important;background:#fff!important;z-index:100!important;
    overscroll-behavior:contain!important;touch-action:pan-y!important
  }
  .customer-picker-search-row input,
  html .pos-selling-shell:not(.pos-edit-active) .customer-picker-search-row input{
    height:42px!important;font-size:15px!important;border-radius:10px!important
  }
  .customer-picker-options,
  html .pos-selling-shell:not(.pos-edit-active) .customer-picker-options{
    max-height:340px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;touch-action:pan-y!important
  }
  .customer-picker-option,
  html .pos-selling-shell:not(.pos-edit-active) .customer-picker-option{
    padding:12px 14px!important;font-size:15px!important
  }
  .pos-customer-backdrop{
    position:fixed!important;inset:0!important;z-index:10040!important;background:rgba(10,26,39,.42)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;animation:none!important
  }
}
