/* Demo-only additions. Everything uses the app's own Bootstrap theme variables so light/dark both work. */
#demo-ribbon{position:fixed;left:50%;top:3px;transform:translateX(-50%);z-index:2147482000;background:rgba(17,27,33,.9);color:#e9edef;font:500 11px/1 inherit;font-family:inherit;padding:5px 11px;border-radius:999px;border:1px solid rgba(255,255,255,.14);white-space:nowrap;cursor:pointer;opacity:.85}
#demo-ribbon:hover{opacity:1}
#demo-ribbon i{color:#f2b84b;margin-right:4px}
#demo-toast{position:fixed;left:50%;top:14px;transform:translate(-50%,-90px);z-index:2147483001;max-width:min(92vw,460px);background:#111b21;color:#e9edef;padding:10px 16px;border-radius:10px;font-size:14px;border:1px solid rgba(255,255,255,.15);transition:transform .25s;box-shadow:0 6px 24px rgba(0,0,0,.25)}
#demo-toast.show{transform:translate(-50%,0)}
.demo-locked{opacity:.6;cursor:not-allowed}
[data-demo-role=agent] #tool-item-campaigns,[data-demo-role=agent] #tool-item-templates{display:none!important}

/* login: demo accounts */
.demo-accounts{margin-top:1.25rem;padding-top:1rem;border-top:1px solid var(--bs-border-color)}
.demo-accounts-title{font-weight:600;font-size:.9rem;margin-bottom:.5rem}
.demo-accounts-title i{color:#00a884;margin-right:.35rem}
.demo-accounts-title span{font-weight:400;font-size:.75rem;color:var(--bs-secondary-color);margin-left:.4rem}
.demo-accounts ul,.demo-list{list-style:none;margin:0 0 .75rem;padding:0}
.demo-accounts li,.demo-list li{display:flex;align-items:center;gap:.75rem;padding:.55rem 0;border-bottom:1px solid var(--bs-border-color)}
.demo-accounts li:last-child,.demo-list li:last-child{border-bottom:0}
.demo-who{flex:1;min-width:0}
.demo-cred code{font-size:.72rem;word-break:break-all}
.login-card{width:min(100%,440px)}

/* modal */
.demo-modal-overlay{position:fixed;inset:0;z-index:2147482500;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;padding:1rem}
.demo-modal{background:var(--bs-body-bg);color:var(--bs-body-color);border:1px solid var(--bs-border-color);border-radius:14px;width:min(100%,560px);max-height:min(88vh,760px);display:flex;flex-direction:column;box-shadow:0 12px 40px rgba(0,0,0,.35)}
.demo-modal header{display:flex;align-items:center;justify-content:space-between;padding:.85rem 1rem;border-bottom:1px solid var(--bs-border-color)}
.demo-modal h2{font-size:1.05rem;margin:0}
.demo-x{border:0;background:transparent;color:inherit;font-size:1.1rem;width:36px;height:36px;border-radius:50%}
.demo-x:hover{background:var(--bs-secondary-bg)}
.demo-modal-body{padding:1rem;overflow-y:auto;overscroll-behavior:contain;font-size:.92rem}
.demo-modal-body h3{font-size:.95rem;margin:1.1rem 0 .4rem}
.demo-modal-body ul,.demo-modal-body ol{padding-left:1.2rem}
.demo-modal-body li{margin-bottom:.3rem}
.demo-table{width:100%;font-size:.82rem;border-collapse:collapse}
.demo-table th,.demo-table td{padding:.35rem .4rem;border-bottom:1px solid var(--bs-border-color);text-align:left;vertical-align:top}
.demo-modal-body ul.demo-list{padding-left:0}
.demo-avatar{width:38px;height:38px;border-radius:50%;background:#00a884;color:#fff;font-weight:600;font-size:.8rem;display:flex;align-items:center;justify-content:center;flex:none}
.demo-add{margin-top:1rem;padding-top:.85rem;border-top:1px solid var(--bs-border-color);display:grid;gap:.5rem}
.demo-add-title{font-weight:600;font-size:.9rem}
.demo-row{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.demo-choice{border:1px solid var(--bs-border-color);border-radius:8px;padding:.6rem .75rem;display:grid;gap:.35rem;margin:0}
.demo-choice label{display:flex;gap:.5rem;align-items:flex-start}

@media (max-width:760px){
  #demo-ribbon{display:none}
  .demo-modal-overlay{align-items:flex-end;padding:0}
  .demo-modal{width:100%;max-height:92vh;border-radius:16px 16px 0 0}
  .demo-row{grid-template-columns:1fr}
  .demo-modal-body{padding-bottom:calc(1rem + env(safe-area-inset-bottom))}
  .demo-accounts li{align-items:flex-start}
  #demo-toast{top:max(10px,env(safe-area-inset-top))}
}
@media (max-width:480px){main.min-vh-100{padding:1rem}}

/* ===================================================================== Omni inbox additions */
/* Channel rail */
.wa-app-rail .rail-ch .rail-icon-wrap i{font-size:21px}
.wa-app-rail .rail-ch-whatsapp .rail-icon-wrap i{color:#25d366}
.wa-app-rail .rail-ch-instagram .rail-icon-wrap i{background:linear-gradient(45deg,#f9a33b 5%,#e8366f 45%,#8b3ad6 90%);-webkit-background-clip:text;background-clip:text;color:transparent}
.wa-app-rail .rail-ch-messenger .rail-icon-wrap i{background:linear-gradient(200deg,#ff6b6b 0%,#a13cf0 45%,#1a8cff 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.wa-sidebar-title .wa-title-ico{margin-right:.45rem;font-size:.95em}
html[data-channel=whatsapp] .wa-title-ico{color:#25d366}
html[data-channel=instagram] .wa-title-ico{color:#d6336c}
html[data-channel=messenger] .wa-title-ico{color:#0a7cff}

/* Chips row: All, Unread, Archived, filter icon, lists arrow */
#custom-list-tabs-container,#filter-add-list-btn{display:none!important}
.wa-lead-filter-label{display:none!important}
#wa-lead-filter-btn,#lists-dd-btn{padding:4px 10px}
#lists-dd-btn #lists-dd-label{max-width:110px;overflow:hidden;text-overflow:ellipsis}
#lists-dd-btn.is-active{background:#e7fce3;color:#008069}
.demo-lists-dd .list-chip-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}
#lists-dd-menu{min-width:220px}

/* Lead details: customer notes */
.demo-notes-form{display:grid;gap:.4rem;margin-bottom:.6rem}
.demo-notes-form .btn{justify-self:end}
.demo-notes{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}
.demo-notes li{border:1px solid var(--bs-border-color);border-radius:8px;padding:.5rem .6rem;font-size:.85rem;background:var(--bs-tertiary-bg)}
.demo-notes li.demo-note-empty{border:0;background:none;padding:0;color:var(--bs-secondary-color)}
.demo-note-text{white-space:pre-wrap;word-break:break-word}
.demo-note-meta{font-size:.72rem;color:var(--bs-secondary-color);margin-top:.2rem}

/* Contacts: channel marker on avatar */
.demo-avatar{position:relative}
.demo-avatar-ch{position:absolute;right:-3px;bottom:-3px;width:17px;height:17px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;color:#fff;border:2px solid var(--bs-body-bg)}
.demo-avatar-ch.ch-whatsapp{background:#25d366}.demo-avatar-ch.ch-instagram{background:#d6336c}.demo-avatar-ch.ch-messenger{background:#0a7cff}

/* Settings: Lead Agent tab is read-only (agents = users) */
#lead-settings.demo-agents-tab #ls-add,#lead-settings.demo-agents-tab .ls-actions,#lead-settings.demo-agents-tab #ls-form{display:none!important}

/* Sample call screen */
.demo-call{position:fixed;inset:0;z-index:2147482600;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:1rem}
.demo-call-card{width:min(100%,360px);border-radius:22px;padding:1.4rem 1.2rem 1.1rem;text-align:center;color:#fff;background:linear-gradient(180deg,#0f2a24 0%,#0b141a 100%);box-shadow:0 18px 50px rgba(0,0,0,.45)}
.demo-call.ch-instagram .demo-call-card{background:linear-gradient(180deg,#3a1450 0%,#120814 100%)}
.demo-call.ch-messenger .demo-call-card{background:linear-gradient(180deg,#0b3a7a 0%,#0a1324 100%)}
.demo-call-top{font-size:.75rem;opacity:.75}
.demo-call-avatar{position:relative;width:104px;height:104px;margin:1.4rem auto .9rem;border-radius:50%;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:600}
.demo-call-ring{position:absolute;inset:-8px;border-radius:50%;border:2px solid rgba(255,255,255,.35);animation:demoRing 1.4s ease-out infinite}
.demo-call.is-live .demo-call-ring{display:none}
@keyframes demoRing{from{transform:scale(.9);opacity:1}to{transform:scale(1.25);opacity:0}}
@media (prefers-reduced-motion:reduce){.demo-call-ring{animation:none}}
.demo-call-name{font-size:1.25rem;font-weight:600}
.demo-call-state{font-variant-numeric:tabular-nums;opacity:.85;margin-top:.15rem;min-height:1.4em}
.demo-call-actions{display:flex;justify-content:center;gap:1.1rem;margin:1.5rem 0 1rem}
.demo-call-btn{width:56px;height:56px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:1.15rem}
.demo-call-btn.on{background:#fff;color:#111}
.demo-call-btn.end{background:#e53935}.demo-call-btn.end i{transform:rotate(135deg)}
.demo-call-btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
.demo-call-note{font-size:.7rem;opacity:.6}
#demo-call-btn{font-size:16px}

/* ------------------------------------------------ Instagram-style inbox (familiar, not a copy) */
html[data-channel=instagram] body.wa-light .wa-chat,html[data-channel=messenger] body.wa-light .wa-chat{background:#fff;background-image:none}
html[data-channel=instagram] body:not(.wa-light) .wa-chat{background:#000;background-image:none}
html[data-channel=messenger] body:not(.wa-light) .wa-chat{background:#18191a;background-image:none}
html[data-channel=instagram] .message-in,html[data-channel=instagram] .message-out{border-radius:22px;padding:8px 14px}
html[data-channel=messenger] .message-in,html[data-channel=messenger] .message-out{border-radius:18px;padding:8px 12px}
html[data-channel=instagram] .message-out{background:linear-gradient(135deg,#7b3fe4 0%,#5b51d8 60%,#3f6ad8 100%)!important;color:#fff!important}
html[data-channel=messenger] .message-out{background:#0a7cff!important;color:#fff!important}
html[data-channel=instagram] .message-out .message-meta,html[data-channel=messenger] .message-out .message-meta{color:rgba(255,255,255,.8)}
html[data-channel=instagram] .message-out .status-tick,html[data-channel=messenger] .message-out .status-tick{filter:brightness(0) invert(1);opacity:.85}
html[data-channel=instagram] body.wa-light .message-in{background:#efefef;color:#000}
html[data-channel=messenger] body.wa-light .message-in{background:#f0f0f0;color:#050505}
html[data-channel=instagram] body:not(.wa-light) .message-in{background:#262626;color:#f5f5f5}
html[data-channel=messenger] body:not(.wa-light) .message-in{background:#303030;color:#e4e6eb}
html[data-channel=instagram] .message-in,html[data-channel=messenger] .message-in{box-shadow:none}
/* accents */
html[data-channel=instagram]{--omni-accent:#d6336c;--omni-accent-soft:rgba(214,51,108,.12)}
html[data-channel=messenger]{--omni-accent:#0a7cff;--omni-accent-soft:rgba(10,124,255,.12)}
html[data-channel=instagram] .composer-send-btn,html[data-channel=messenger] .composer-send-btn{background:var(--omni-accent)!important;border-color:var(--omni-accent)!important}
html[data-channel=instagram] .unread-badge,html[data-channel=messenger] .unread-badge{background:var(--omni-accent)!important;color:#fff!important}
html[data-channel=instagram] .wa-filter-chip.active,html[data-channel=messenger] .wa-filter-chip.active{background:var(--omni-accent-soft)!important;color:var(--omni-accent)!important}
html[data-channel=instagram] .wa-filter-chip.active .filter-count,html[data-channel=messenger] .wa-filter-chip.active .filter-count{background:var(--omni-accent)!important;color:#fff!important}
html[data-channel=instagram] .wa-app-rail .rail-btn.active,html[data-channel=messenger] .wa-app-rail .rail-btn.active{background:var(--omni-accent-soft)!important;color:var(--omni-accent)!important}
html[data-channel=instagram] .wa-app-rail .rail-badge,html[data-channel=messenger] .wa-app-rail .rail-badge{background:var(--omni-accent)}
html[data-channel=instagram] .chat-preview-unread,html[data-channel=messenger] .chat-preview-unread{color:var(--omni-accent)!important}
html[data-channel=instagram] .wa-chat-header,html[data-channel=messenger] .wa-chat-header{box-shadow:0 1px 0 var(--bs-border-color)}
html[data-channel=instagram] body.wa-light .wa-chat-header,html[data-channel=messenger] body.wa-light .wa-chat-header,
html[data-channel=instagram] body.wa-light .wa-composer,html[data-channel=messenger] body.wa-light .wa-composer{background:#fff}
html[data-channel=instagram] body:not(.wa-light) .wa-chat-header,html[data-channel=instagram] body:not(.wa-light) .wa-composer{background:#000}
html[data-channel=messenger] body:not(.wa-light) .wa-chat-header,html[data-channel=messenger] body:not(.wa-light) .wa-composer{background:#242526}
html[data-channel=instagram] .composer-input,html[data-channel=messenger] .composer-input{border-radius:22px!important}
html[data-channel=instagram] #demo-call-btn,html[data-channel=messenger] #demo-call-btn{color:var(--omni-accent)}

@media (max-width:768px){
  .wa-app-rail .rail-ch .rail-icon-wrap i{font-size:20px}
  html[data-channel=instagram] .message-in,html[data-channel=instagram] .message-out{border-radius:20px!important;padding:7px 12px!important}
  html[data-channel=messenger] .message-in,html[data-channel=messenger] .message-out{border-radius:18px!important;padding:7px 11px!important}
  .demo-call{padding:0}
  .demo-call-card{width:100%;height:100%;border-radius:0;display:flex;flex-direction:column;justify-content:center}
}
.wa-app-rail .rail-ch-whatsapp .rail-badge{background:#25d366!important;color:#fff}
.wa-app-rail .rail-ch-instagram .rail-badge{background:#d6336c!important;color:#fff}
.wa-app-rail .rail-ch-messenger .rail-badge{background:#0a7cff!important;color:#fff}
html[data-channel=instagram] .wa-filter-chip .filter-count,html[data-channel=messenger] .wa-filter-chip .filter-count{background:var(--omni-accent)!important;color:#fff!important}
