/* Permanent utility rail; the mounted phone controller and message surface are unchanged. */
.sp-permanent-rail{--sp-brand:#FF4400;--sp-line:#dce6df;--sp-muted:#526e60;position:fixed;inset:0 0 0 auto!important;z-index:100001;width:60px;height:100vh;height:100dvh;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px;background:#fffdfa;border:0;border-left:1px solid var(--sp-line);box-shadow:-2px 0 10px #173d330a;overflow:hidden;font-family:'Nimbus Sans',Arial,sans-serif;font-size:14px;color:#173d33}
.sp-permanent-rail[data-open=true]{right:min(320px,calc(100vw - 60px))!important}
.sp-permanent-rail button{font:inherit;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;min-height:44px;padding:10px;border:0;border-radius:10px;background:transparent;color:#173d33;cursor:pointer}
.sp-permanent-rail button:hover{background:#edf3ef}.sp-permanent-rail button[aria-current=page],.sp-permanent-rail button[aria-expanded=true]:not(.sp-rail-space){background:#fff0e7;color:#c53400;box-shadow:inset 3px 0 #FF4400}
.sp-permanent-rail button:focus-visible{outline:2px solid #FF4400;outline-offset:1px}.sp-permanent-rail button:disabled{opacity:.5;cursor:wait}.sp-permanent-rail svg{width:22px;height:22px;stroke-width:1.9;flex-shrink:0}
.sp-permanent-rail .sp-dock{position:relative!important;inset:auto!important;width:44px;min-height:44px;height:44px;border:0;border-radius:10px;box-shadow:none;z-index:auto;background:transparent}
.sp-rail-call-indicator{position:absolute;bottom:5px;right:5px;width:7px;height:7px;border-radius:50%;background:#84928a}.sp-rail-call-indicator[data-tone=ready]{background:#17a566}.sp-rail-call-indicator[data-tone=call],.sp-rail-call-indicator[data-tone=ringing]{background:#FF4400}.sp-rail-call-indicator[data-tone=held],.sp-rail-call-indicator[data-tone=paused]{background:#e8ae32}
.sp-online-staff{display:flex;flex-direction:column;align-items:center;gap:10px;min-height:0;flex:0 1 auto;max-height:calc(100dvh - 380px);overflow-y:auto;overflow-x:hidden;width:48px;padding:8px 2px;scrollbar-width:thin;border-top:1px solid var(--sp-line);border-bottom:1px solid var(--sp-line)}
.sp-permanent-rail .sp-colleague{width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;background:#edf3ef;isolation:isolate}.sp-colleague img{position:absolute;inset:0;width:40px;height:40px;border-radius:50%;object-fit:cover;z-index:1}.sp-colleague-initials{font-size:12px;font-weight:700}.sp-colleague i{position:absolute;right:0;bottom:0;width:11px;height:11px;border:2px solid #fffdfa;border-radius:50%;background:#17a566;z-index:2}
.sp-permanent-rail .sp-rail-space{flex:1;min-height:24px;height:auto;width:100%;border-radius:8px}.sp-rail-space:hover{background:#fff0e7}.sp-rail-utilities{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.sp-quick-mark{position:absolute;right:5px;bottom:3px;font-size:14px;font-weight:700;background:#fffdfa;line-height:1}
.sp-with-permanent-rail{width:min(320px,calc(100vw - 60px))!important;grid-template-columns:minmax(0,1fr)!important}.sp-direct-error{padding:8px 12px;color:#a52b21;font-size:13px}
body:has(.sp-permanent-rail) .reception-v2>main{margin-right:60px}
@media(max-height:600px){.sp-permanent-rail{padding-top:6px;padding-bottom:6px;gap:4px}.sp-rail-utilities{gap:0}.sp-online-staff{max-height:calc(100dvh - 320px)}}
.sp-permanent-rail .sp-dock{color:#173d33!important}
.sp-preview-label{font-size:12px;color:#526e60;line-height:1.2}.sp-preview-note{font-size:12px;color:#526e60;background:#fff4e9;padding:8px 12px;margin:0!important;flex-shrink:0}.sp-team-surface:has(.sp-preview-note){flex-direction:column}.sp-team-surface:has(.sp-preview-note)>.team-messages{flex:1;min-height:0}
.sp-rail-divider{width:32px;height:1px;background:var(--sp-line);flex-shrink:0;margin:2px 0}.sp-online-staff{flex:0 1 auto;max-height:calc(100dvh - 380px)}
body:has(.sp-permanent-rail) .reception-priority-alert{right:72px!important;max-width:calc(100vw - 84px)}

/* Incoming alert: compositor-only opacity/transform; never intercept rail controls. */
.sp-permanent-rail[data-incoming=true]{background:#fff3eb;border-color:var(--sp-brand)}
.sp-permanent-rail[data-incoming=true]::after{content:"";position:absolute;inset:0;pointer-events:none;border:2px solid var(--sp-brand);box-shadow:inset 0 0 14px #ff440033;opacity:.6;animation:sp-incoming-glow 2.4s ease-in-out infinite}
.sp-permanent-rail .sp-dock[data-incoming=true]{background:var(--sp-brand)!important;color:#fff!important;box-shadow:none}
.sp-dock[data-incoming=true]>svg{animation:sp-incoming-phone 1.8s ease-in-out infinite}
.sp-dock[data-incoming=true] .sp-rail-call-indicator{display:none}
.sp-incoming-count,.sp-missed-count{position:absolute;display:grid;place-items:center;min-width:18px;height:18px;padding:0 3px;box-sizing:border-box;border-radius:10px;font-size:12px;font-weight:700;line-height:1;border:1px solid #fffdfa}
.sp-incoming-count{right:-2px;top:-3px;background:#173d33;color:#fff}
.sp-missed-count{right:-2px;bottom:-3px;background:#b42318;color:#fff}
@keyframes sp-incoming-glow{0%,100%{opacity:.4}50%{opacity:.85}}
@keyframes sp-incoming-phone{0%,100%{transform:scale(1)}50%{transform:scale(1.14)}}
@media(prefers-reduced-motion:reduce){.sp-permanent-rail[data-incoming=true]::after,.sp-dock[data-incoming=true]>svg{animation:none!important}.sp-permanent-rail[data-incoming=true]::after{opacity:.8}}
