/* Shared customer selection styles for the mobile masters. */
.master2-customer-dialog-shell{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;background:var(--color--Theme--Base--Completement-1)}
.master2-customer-dialog-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;min-height:64px;padding:8px 12px;box-sizing:border-box;border-bottom:1px solid var(--color--Theme--Base--Completement-3)}
.master2-customer-dialog-header strong{text-align:center;color:var(--color--Theme--Background--Primary-1);font-size:16px;font-weight:700}
.master2-customer-dialog-close{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:var(--color--Theme--Base--Completement-2);color:var(--color--Theme--Icon--Primary-1)}
.master2-customer-dialog-close svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.master2-customer-search-wrap{position:relative;margin:12px 14px 8px}
.master2-customer-search{width:100%;height:48px;padding:0 46px 0 14px;box-sizing:border-box;border:1px solid var(--color--Theme--Border--Primary-9);border-radius:14px;outline:0;background:var(--color--Theme--Base--Completement-1);color:var(--color--Theme--Background--Primary-1);font-family:inherit;font-size:14px;text-align:right}
.master2-customer-search:focus{border-color:var(--color--Theme--Border--Primary-5);box-shadow:0 0 0 3px var(--color--Theme--Background--Primary-9)}
.master2-customer-search-icon{position:absolute;right:14px;top:50%;width:20px;height:20px;transform:translateY(-50%);color:var(--color--Theme--Icon--Primary-2);pointer-events:none}
.master2-customer-search-icon svg{width:100%;height:100%;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.master2-customer-list{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:6px 14px 18px;box-sizing:border-box}
.master2-customer-item{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:start;margin:0 0 10px;padding:14px;box-sizing:border-box;border:1px solid var(--color--Theme--Base--Completement-3);border-radius:16px;background:var(--color--Theme--Base--Completement-1);color:var(--color--Theme--Background--Primary-1);font-family:inherit;text-align:right}
.master2-customer-item.is-selected{border-color:var(--color--Theme--Border--Primary-5);background:var(--color--Theme--Background--Primary-9)}
.master2-customer-item-check{grid-column:1;width:26px;height:26px;color:var(--color--Theme--Icon--Primary-2);opacity:.3}
.master2-customer-item.is-selected .master2-customer-item-check{opacity:1}
.master2-customer-item-check svg{width:100%;height:100%;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.master2-customer-item-content{grid-column:2;min-width:0;display:flex;flex-direction:column;gap:6px}
.master2-customer-item-name{font-size:14px;font-weight:700;color:var(--color--Theme--Background--Primary-1)}
.master2-customer-item-meta{display:flex;flex-wrap:wrap;gap:6px;color:var(--color--Theme--Base--Primary-9);font-size:12px}
.master2-customer-item-address{display:flex;align-items:flex-start;gap:6px;color:var(--color--Theme--Base--Primary-9);font-size:12px;line-height:1.7}
.master2-customer-item-address svg{width:16px;height:16px;flex:0 0 16px;margin-top:2px;stroke:var(--color--Theme--Icon--Primary-2);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.master2-customer-empty{padding:30px 16px;text-align:center;color:var(--color--Theme--Base--Primary-9);font-size:13px}
.master2-customer-dialog-footer{flex:0 0 auto;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--color--Theme--Base--Completement-3);background:var(--color--Theme--Base--Completement-1)}
.master2-customer-select-button:disabled{opacity:.7;cursor:wait}
.master2-customer-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.master2-customer-select-button{width:100%;min-height:48px;border:0;border-radius:14px;background:var(--color--CTA--Background--Primary-2);color:var(--color--CTA--Color--Primary-2,var(--color--Theme--Base--Completement-1));font-family:inherit;font-size:14px;font-weight:700}

.master2-customer-dialog{position:fixed;inset:0;z-index:100000;display:none;flex-direction:column;width:100%;height:100vh;height:100dvh;background:var(--color--Theme--Base--Completement-1);overflow:hidden;direction:rtl}
.master2-customer-dialog.is-open{display:flex}
#master2CustomerSaveStatus{display:block;max-height:96px;overflow:auto;white-space:normal;line-height:1.8;font-size:13px;color:#9b2c16}
.master2-customer-financial{display:flex;flex-direction:column;gap:5px;margin-top:3px;font-size:12px;line-height:1.8}
.master2-customer-balance{width:fit-content;padding:3px 9px;border-radius:8px;background:#f3f4f6;color:#4b5563;font-weight:700}
.master2-customer-balance[data-kind="debit"]{background:#fff1ed;color:#a33220}
.master2-customer-balance[data-kind="credit"]{background:#e8f7ef;color:#087443}
.master2-customer-balance[data-kind="settled"]{background:#edf5fb;color:#275f81}
.master2-customer-updated{font-size:11px;color:var(--color--Theme--Base--Primary-9);font-weight:400}
.master2-customer-progress{display:flex;align-items:center;gap:12px;padding:13px;margin-bottom:10px;border:1px solid #cce9db;border-radius:14px;background:linear-gradient(120deg,#f0faf5,#fff);color:#075e38;text-align:right}
.master2-customer-progress[hidden]{display:none}
.master2-customer-progress strong{display:block;font-size:13px;line-height:1.8}
.master2-customer-progress small{display:block;font-size:11px;line-height:1.8;color:#47745e}
.master2-customer-spinner{flex:0 0 25px;width:25px;height:25px;box-sizing:border-box;border:3px solid #cce9db;border-top-color:#008347;border-radius:50%;animation:master2-customer-spin .8s linear infinite}
@keyframes master2-customer-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.master2-customer-spinner{animation-duration:2s}}
.master2-selected-customer{    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    margin: 0;
    min-height: 60px;
    padding: 5px 10px;
    box-sizing: border-box;
    border: 1px solid var(--color--Theme--Border--Primary-9);
    border-radius: 15px;
    background: linear-gradient(180deg, var(--color--Theme--Background--Primary-9) 0%, var(--color--Theme--Base--Completement-1) 100%);
    color: var(--color--Theme--Background--Primary-1);
    direction: ltr;
    overflow: hidden;}
.master2-selected-customer-arrow{grid-column:1;align-self:start;margin-top:7px;display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;color:var(--color--Theme--Icon--Primary-2)}
.master2-selected-customer-arrow svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
button.master2-selected-customer-arrow{position:relative;z-index:4;padding:0;border:0;border-radius:6px;background:transparent;cursor:pointer;font-family:inherit}
button.master2-selected-customer-arrow:focus-visible{outline:2px solid var(--color--Theme--Border--Primary-5);outline-offset:2px}
.master2-selected-customer-arrow svg{transform:rotate(90deg)}
.master2-selected-customer.is-collapsed .master2-selected-customer-arrow svg{transform:rotate(-90deg)}
.master2-selected-customer.is-collapsed .master2-customer-financial{display:none}
.master2-selected-customer[data-no-customer] .master2-selected-customer-arrow{visibility:hidden}
.master2-selected-customer-body{grid-column:2;display:flex;flex-direction:column;align-items:flex-end;gap:5px;min-width:0;direction:rtl;text-align:right}
.master2-selected-customer-body > .master2-customer-financial{align-self:stretch;align-items:flex-start;text-align:right}
.master2-selected-customer-line{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;flex-wrap:wrap;direction:rtl;text-align:right}
.master2-selected-customer-name{    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color--Theme--Background--Primary-1);
    white-space: nowrap;
    text-align: right;}
.master2-selected-customer-separator{width:1px;height:18px;background:var(--color--Theme--Border--Primary-8);display:inline-block}
.master2-selected-customer-phone{    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color--Theme--Base--Primary-9);
    direction: ltr;
    unicode-bidi: plaintext;
    white-space: nowrap;}
.master2-selected-customer-icon{grid-column:3;align-self:start;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:var(--color--Theme--Background--Primary-9);color:var(--color--Theme--Icon--Primary-2)}
.master2-selected-customer-icon svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.master2-selected-customer-label{display:none}
.master2-selected-customer-button{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:18px;background:transparent;color:transparent;font-size:0;box-shadow:none;cursor:pointer;z-index:3}
.master2-selected-customer-button:focus-visible{outline:2px solid var(--color--Theme--Border--Active-5);outline-offset:-2px}
body.master2-customer-dialog-open{overflow:hidden!important}

/* The Master 1 drawer sits above the header's stacking context. */
.master2-customer-dialog[data-form-overlay] { z-index: 1000002; }

@media (max-width: 799px) {
    .master2-customer-dialog[data-quick-order] {
        top: var(--qo-viewport-top, 0px);
        bottom: auto;
        height: var(--qo-viewport-height, 100dvh);
    }
}

@media (min-width: 1024px) {
    .master2-selected-customer { padding: 10px 16px; border-radius: 14px; }
}
