/* ===== Availability indicators ===== */
.sb-profile-avatar{position:relative}
.sb-profile-avatar .status-dot{position:absolute;right:-2px;bottom:-2px;width:9px;height:9px;border-radius:50%;background:#12B76A;box-shadow:0 0 0 1.5px #F8F8F8;transition:background .18s ease}
body[data-av="busy"] .sb-profile-avatar .status-dot,body[data-av="busy"] [data-av-dot]{background:#F04438}
body[data-av="brb"] .sb-profile-avatar .status-dot,body[data-av="brb"] [data-av-dot]{background:#F79009}
body[data-av="offline"] .sb-profile-avatar .status-dot,body[data-av="offline"] [data-av-dot]{background:#98A2B3}
body[data-av="available"] .sb-profile-avatar .status-dot,body[data-av="available"] [data-av-dot]{background:#12B76A}
/* Avatar dot — only visible when sidebar is collapsed (badge near name is hidden there) */
.sb-profile-avatar .status-dot{display:none}
body.sb-collapsed:not(.sb-hover-expanded) .sb-profile-avatar .status-dot{display:block}

/* Profile row — single-line layout: avatar + name + badge + chev */
/* Profile row — match nav-item padding/margins for visual consistency */
.sb-profile{height:auto !important;min-height:34px;padding:6px 12px 6px 10px !important;margin:1px 0 0 !important;gap:10px !important;align-items:center !important}
.sb-profile-avatar{width:22px !important;height:22px !important;flex:0 0 22px !important;font:600 9.5px/1 'Inter',sans-serif !important;letter-spacing:.02em !important;color:#fff !important;background:#EEF4FF !important;box-shadow:inset 0 0 0 1px rgba(16,24,40,.06) !important;border-radius:50%}
.sb-profile-avatar img{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}
.sb-profile-avatar .jc-av-svg{width:100%;height:100%;display:block;border-radius:50%}
.mp-avatar .jc-av-svg{width:100%;height:100%;display:block;border-radius:inherit}
.sb-profile-name{font-size:13px !important;line-height:1.25 !important;letter-spacing:-.005em !important;flex:0 1 auto;min-width:0}

/* Inline status badge — sits beside the name on the same row */
.sb-profile-text{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;min-width:0;flex:1 1 auto}
.sb-profile-text .sb-av-badge{margin-left:auto;flex:0 0 auto}
body.sb-collapsed .sidebar:not(.sb-hover-expanded) .sb-profile-text{display:none !important}
.sb-av-badge{display:inline-flex;align-items:center;gap:5px;padding:2px 7px 2px 7px;background:#fff;border:1px solid #EAECF0;border-radius:999px;font:500 10.5px/1.1 'Inter',sans-serif;color:#475467;cursor:pointer;max-width:100%;width:fit-content;transition:background .14s,border-color .14s,color .14s,box-shadow .14s}
.sb-av-badge:hover{background:#F9FAFB;border-color:#D0D5DD;color:#101828;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.sb-av-badge:focus-visible{outline:2px solid #84CAFF;outline-offset:1px}
.sb-av-badge-dot{width:6px;height:6px;border-radius:50%;background:#12B76A;flex:0 0 6px}
body[data-av="busy"] .sb-av-badge-dot{background:#F04438}
body[data-av="brb"] .sb-av-badge-dot{background:#F79009}
body[data-av="offline"] .sb-av-badge-dot{background:#98A2B3}
.sb-av-badge-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.005em}
.sb-av-badge-reason{color:#98A2B3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:80px}
.sb-av-badge-reason:not(:empty)::before{content:"·";margin:0 3px;color:#D0D5DD}
.sb-av-badge-chev{color:#98A2B3;flex:0 0 9px;margin-left:1px;transition:color .14s}
.sb-av-badge:hover .sb-av-badge-chev{color:#475467}
/* Row chevron — hidden (badge is the only chevron-bearing surface) */
.sb-profile-chev{display:none !important}
/* Don't visually "select" the whole row when the badge is being interacted with */
.sb-profile:has(.sb-av-badge:hover) .sb-profile-chev{opacity:.4}
/* Hide badge in collapsed sidebar */
body.sb-collapsed:not(.sb-hover-expanded) .sb-av-badge{display:none}

/* ====== Mode A: single click target — badge is a colored status pill (non-clickable) ====== */
body.status-ui-single .sb-av-badge{pointer-events:none;display:inline-flex;align-items:center;gap:5px;padding:2px 9px 2px 8px;background:#ECFDF3;border:1px solid #A6F4C5;color:#067647;border-radius:999px;font:600 11px/1.1 'Inter',sans-serif;box-shadow:none}
body.status-ui-single[data-av="busy"] .sb-av-badge{background:#FEF3F2;border-color:#FECDCA;color:#B42318}
body.status-ui-single[data-av="brb"] .sb-av-badge{background:#FFFAEB;border-color:#FEDF89;color:#B54708}
body.status-ui-single[data-av="offline"] .sb-av-badge{background:#F2F4F7;border-color:#EAECF0;color:#475467}
body.status-ui-single .sb-av-badge:hover{box-shadow:none}
body.status-ui-single .sb-av-badge-chev{display:none}
body.status-ui-single .sb-av-badge-reason{color:inherit;opacity:.7}
body.status-ui-single .sb-av-badge-reason:not(:empty)::before{color:currentColor;opacity:.5}
body.status-ui-single .sb-profile-text{gap:6px}

/* ====== Mode B: stacked rows — badge becomes a full-width second row ====== */
body.status-ui-stacked .sb-profile{display:grid !important;grid-template-columns:22px 1fr;grid-template-rows:auto auto;gap:6px 10px !important;align-items:center}
body.status-ui-stacked .sb-profile-avatar{grid-column:1;grid-row:1}
body.status-ui-stacked .sb-profile-text{display:contents}
body.status-ui-stacked .sb-profile-name{grid-column:2;grid-row:1}
body.status-ui-stacked .sb-av-badge{grid-column:1 / -1;grid-row:2;width:100%;max-width:none;justify-content:flex-start;padding:6px 10px;font-size:11.5px;border-radius:8px;gap:7px}
body.status-ui-stacked .sb-av-badge-dot{width:7px;height:7px;flex:0 0 7px}
body.status-ui-stacked .sb-av-badge-chev{margin-left:auto;width:12px;height:12px;flex:0 0 12px}
body.status-ui-stacked .sb-profile-chev{display:none !important}
/* In collapsed sidebar, hide second row entirely */
body.status-ui-stacked.sb-collapsed:not(.sb-hover-expanded) .sb-profile{display:flex !important}

/* Popover header — avatar + status line */
.profile-pop-header{display:none}
.pp-id{display:flex;align-items:center;gap:10px}
.pp-id-avatar{position:relative;width:36px;height:36px;border-radius:50%;background:#EEF4FF;color:#3538CD;display:grid;place-items:center;font:600 12px 'Inter',sans-serif;letter-spacing:.01em;flex:0 0 36px}
.pp-id-dot{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:#12B76A;box-shadow:0 0 0 2px #fff}
.pp-id-text{min-width:0;flex:1 1 auto}
.profile-pop-name{font:600 14px/1.25 'Inter',sans-serif;color:#101828;margin:0}
.pp-id-status{display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:3px 9px 3px 8px;background:#F2F4F7;border:1px solid #EAECF0;border-radius:999px;font:500 11.5px/1 'Inter',sans-serif;color:#344054;width:fit-content}
.pp-id-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#12B76A;flex:0 0 7px}
body[data-av="busy"] .pp-id-status::before{background:#F04438}
body[data-av="brb"] .pp-id-status::before{background:#F79009}
body[data-av="offline"] .pp-id-status::before{background:#98A2B3}
body[data-av="busy"] .pp-id-status{background:#FEF3F2;border-color:#FEE4E2;color:#B42318}
body[data-av="brb"] .pp-id-status{background:#FFFAEB;border-color:#FEF0C7;color:#B54708}
body[data-av="offline"] .pp-id-status{background:#F2F4F7;border-color:#EAECF0;color:#475467}
.pp-id-reason{color:inherit;opacity:.7}
.pp-id-reason:not(:empty)::before{content:"·";margin:0 4px;opacity:.5}

/* Availability section in popover — nested */
.profile-pop{overflow:visible !important}
.av-section{padding:16px 6px 8px !important;border-bottom:1px solid #EAECF0}
.av-section-label{padding:0 12px 6px;font:500 11px/1 'Inter',sans-serif;color:#98A2B3;letter-spacing:.01em;text-transform:none}

/* Nested current-status row */
.av-current{position:relative;display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:6px;cursor:pointer;transition:background .14s ease}
.av-current:hover,.av-current:focus-visible,.av-current.open{background:#F4F4F5;outline:none}
.av-current-dot{width:10px;height:10px;border-radius:50%;background:#12B76A;box-shadow:0 0 0 2px #D1FADF;flex:0 0 10px;margin-left:2px}
body[data-av="busy"] .av-current-dot{background:#F04438;box-shadow:0 0 0 2px #FEE4E2}
body[data-av="brb"] .av-current-dot{background:#F79009;box-shadow:0 0 0 2px #FEF0C7}
body[data-av="offline"] .av-current-dot{background:#98A2B3;box-shadow:0 0 0 2px #EAECF0}
.av-current-text{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1 1 auto}
.av-current-l{font:500 13px/1.3 'Inter',sans-serif;color:#101828}
.av-current-h{font:400 11px/1.2 'Inter',sans-serif;color:#98A2B3}
.av-current-reason{font:500 12px/1 'Inter',sans-serif;color:#475467;padding:3px 8px;background:#fff;border:1px solid #EAECF0;border-radius:999px}
.av-current-reason:empty{display:none}
.av-current-chev{color:#98A2B3;display:grid;place-items:center;transition:transform .15s ease;flex:0 0 14px;margin-left:auto}
.av-current:hover .av-current-chev,.av-current.open .av-current-chev{transform:translateX(2px);color:#475467}

/* Flyout (nested) */
.av-flyout{position:absolute;left:calc(100% + 6px);top:-6px;min-width:240px;padding:6px 0 0;background:#fff;border:1px solid #EAECF0;border-radius:10px;box-shadow:0 12px 32px rgba(16,24,40,.14),0 2px 6px rgba(16,24,40,.06);opacity:0;visibility:hidden;transform:translateX(-4px) scale(0.985);transform-origin:left center;transition:opacity .22s cubic-bezier(0.16,1,0.3,1),transform .26s cubic-bezier(0.16,1,0.3,1),visibility 0s linear .22s;z-index:50;overflow:hidden}
.av-flyout::before{content:"";position:absolute;left:-10px;top:0;bottom:0;width:10px}
.av-flyout > .av-status-btn{margin:0 6px}
.av-current:hover .av-flyout,.av-current.open .av-flyout{opacity:1;visibility:visible;transform:none;transition:opacity .18s cubic-bezier(0.16,1,0.3,1),transform .22s cubic-bezier(0.16,1,0.3,1)}

/* Status buttons (used in nested flyout + small avPopover) */
.av-status-list{display:flex;flex-direction:column;gap:1px}
.av-status-btn{display:grid;grid-template-columns:18px 1fr 18px;align-items:center;gap:10px;padding:8px 10px;background:transparent;border:0;border-radius:6px;cursor:pointer;text-align:left;font:inherit;width:100%;transition:background .14s ease}
.av-status-btn:hover{background:#F4F4F5}
.av-status-btn[aria-checked="true"]{background:#F9FAFB}
.av-status-btn[aria-checked="true"] .av-status-l{font-weight:600;color:#101828}
.av-status-check{display:none;justify-self:end}
.av-status-btn[aria-checked="true"] .av-status-check{display:inline-grid;place-items:center}
.av-flyout-sep{display:flex;align-items:center;gap:6px;padding:7px 12px;margin:4px 0;background:#F2F4F7;font:500 11.5px/1 'Inter',sans-serif;color:#475467}
.av-info-ic{color:#98A2B3;display:inline-grid;place-items:center}
.av-flyout-foot{border-top:1px solid #EAECF0;margin-top:4px;padding:4px}
.av-foot-link{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:6px;color:#1849A9;font:500 13px/1.2 'Inter',sans-serif;text-decoration:none;transition:background .14s ease}
.av-foot-link:hover{background:#F4F4F5}
.av-dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:0 0 10px;justify-self:center}
.av-dot--available{background:#12B76A;box-shadow:0 0 0 2px #D1FADF}
.av-dot--busy{background:#F04438;box-shadow:0 0 0 2px #FEE4E2}
.av-dot--brb{background:#F79009;box-shadow:0 0 0 2px #FEF0C7}
.av-dot--offline{background:#98A2B3;box-shadow:0 0 0 2px #EAECF0}
.av-status-l{font:500 13px/1.3 'Inter',sans-serif;color:#101828}
.av-status-h{font:400 11px/1.2 'Inter',sans-serif;color:#98A2B3;white-space:nowrap}
/* Status rows come in two shapes: the flyout ends each row with a 16px
   checkmark, which fits the 18px grid column; the popover ends each row with
   a hint ("Do not disturb"), which does not — it wrapped onto three lines.
   Rows carrying a hint get a natural-width final column instead. */
.av-status-btn:has(.av-status-h){grid-template-columns:18px 1fr auto}

/* Reason picker (inside flyout) */
.av-flyout-reasons{padding:8px 6px 4px;margin-top:6px;border-top:1px dashed #EAECF0;animation:av-fade-in .22s ease}
.av-flyout-reasons[hidden]{display:none}
.av-flyout-reasons .av-reason-label{padding:0 4px}
.av-flyout-reasons .av-reason-chips{padding:0 2px}
/* legacy reason wrap (outside flyout) — kept for popover compatibility */
.av-reason-wrap{padding:10px 10px 4px;margin-top:6px;border-top:1px dashed #EAECF0;animation:av-fade-in .22s ease}
@keyframes av-fade-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
.av-reason-label{font:500 11px/1 'Inter',sans-serif;color:#98A2B3;text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px}
.av-reason-chips{display:flex;flex-wrap:wrap;gap:6px}
.av-chip{appearance:none;border:0;background:transparent;color:#344054;font:500 12.5px/1.1 'Inter',sans-serif;padding:5px 8px 5px 6px;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:background .14s ease}
.av-chip::before{content:"";width:7px;height:7px;border-radius:50%;background:#D0D5DD;flex:0 0 7px;transition:background .14s ease}
.av-chip:hover{background:#F4F4F5}
.av-chip:hover::before{background:#98A2B3}
.av-chip.active{background:#F2F4F7;color:#101828;font-weight:600}
body[data-av="busy"] .av-chip.active::before{background:#F04438}
body[data-av="brb"] .av-chip.active::before{background:#F79009}
.av-reason-chips{display:flex;flex-wrap:wrap;gap:2px}

/* Small availability-only popover (badge click target) */
.av-popover{position:fixed;display:none;min-width:264px;padding:8px;background:#fff;border:1px solid #EAECF0;border-radius:10px;box-shadow:0 16px 40px rgba(16,24,40,.16),0 2px 6px rgba(16,24,40,.06);z-index:1000}
.av-popover.open{display:block;animation:av-fade-in .14s ease}
.av-popover .av-section-label{padding:4px 8px 6px}
