/* GattoMusic 2.0 — Build 10.13 — ajustes cirúrgicos */

/* ========================================================================== */
/* SALAS — ⋮ sempre visível para quem tem permissão                           */
/* ========================================================================== */
.chat-v1012-room-menu-button{display:none!important}
.chat-v977-room-item{position:relative!important;overflow:visible!important;isolation:isolate}
.chat-v977-room-item>.chat-v977-room-open,
.chat-v977-room-item>button:not(.chat-v1013-room-menu-button){padding-right:40px!important}
.chat-v1013-room-menu-button{
  position:absolute!important;top:6px!important;right:6px!important;z-index:80!important;
  display:inline-grid!important;visibility:visible!important;opacity:.88!important;place-items:center!important;
  width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;
  flex:0 0 30px!important;padding:0!important;margin:0!important;overflow:visible!important;
  border:1px solid color-mix(in srgb,var(--chat-v72-line,var(--line)) 80%,transparent)!important;
  border-radius:9px!important;background:color-mix(in srgb,var(--chat-v72-panel-2,var(--surface)) 94%,transparent)!important;
  color:var(--chat-v72-text,var(--text))!important;font:800 20px/1 Verdana,Arial,sans-serif!important;
  letter-spacing:1px!important;cursor:pointer!important;transform:none!important;filter:none!important;
}
.chat-v1013-room-menu-button:hover,.chat-v1013-room-menu-button:focus-visible,.chat-v1013-room-menu-button[aria-expanded="true"]{
  opacity:1!important;border-color:var(--chat-v72-accent,var(--secondary))!important;
  outline:2px solid color-mix(in srgb,var(--chat-v72-accent,var(--secondary)) 30%,transparent)!important;outline-offset:1px!important
}
.chat-v1013-room-menu{
  position:fixed!important;z-index:2147483000!important;display:grid!important;visibility:visible!important;opacity:1!important;
  min-width:178px!important;max-width:min(270px,calc(100vw - 16px))!important;padding:6px!important;
  overflow:visible!important;border:1px solid color-mix(in srgb,var(--chat-v72-line,var(--line)) 94%,transparent)!important;
  border-radius:12px!important;background:var(--chat-v72-panel-2,var(--surface,#171b25))!important;
  box-shadow:0 16px 40px rgba(0,0,0,.42)!important;isolation:isolate!important
}
.chat-v1013-room-menu-end{
  width:100%!important;min-height:40px!important;padding:9px 11px!important;border:0!important;border-radius:8px!important;
  background:transparent!important;color:#ff9da7!important;text-align:left!important;font:800 13px/1.25 Verdana,Arial,sans-serif!important;cursor:pointer!important
}
.chat-v1013-room-menu-end:hover,.chat-v1013-room-menu-end:focus-visible{
  background:rgba(145,26,39,.28)!important;outline:2px solid rgba(255,157,167,.28)!important;outline-offset:-1px!important
}
@media(max-width:900px){
  .chat-v1013-room-menu-button{top:5px!important;right:5px!important;width:31px!important;height:31px!important;min-width:31px!important;min-height:31px!important}
}

/* ========================================================================== */
/* PREFERÊNCIAS — linhas realmente responsivas                               */
/* ========================================================================== */
.chat-v92-call-surface-setting,.chat-v1013-theme-setting{grid-column:1/-1!important;min-width:0!important;width:100%!important;box-sizing:border-box!important}
.chat-v92-call-surface-row,.chat-v912-media-setting,.chat-v1013-theme-row{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))!important;
  align-items:center!important;gap:10px 12px!important;min-width:0!important;width:100%!important;box-sizing:border-box!important
}
.chat-v92-call-surface-copy,.chat-v1013-theme-copy,.chat-v912-media-setting>span{min-width:0!important;max-width:100%!important;word-break:normal!important;overflow-wrap:normal!important;white-space:normal!important}
.chat-v92-call-surface-copy strong,.chat-v1013-theme-copy strong{display:block!important;white-space:normal!important;word-break:normal!important}
.chat-v92-call-surface-select,.chat-v912-media-select,.chat-v1013-theme-select{
  width:100%!important;min-width:0!important;max-width:100%!important;min-height:42px!important;box-sizing:border-box!important
}
.chat-v1013-theme-setting{
  display:grid;gap:7px;padding:11px 12px;border:1px solid var(--chat-v72-line,var(--line));border-radius:11px;background:var(--chat-v72-card,var(--surface))
}
.chat-v1013-theme-copy{display:grid;gap:3px}.chat-v1013-theme-copy strong{font-size:.78rem}.chat-v1013-theme-copy small{color:var(--chat-v72-muted,var(--muted));font-size:.68rem;line-height:1.35}
.chat-v1013-theme-select{border:1px solid var(--chat-v72-line,var(--line));border-radius:9px;background:var(--chat-v72-panel-2,var(--surface));color:var(--chat-v72-text,var(--text));padding:8px 10px;font:700 .75rem/1.2 Verdana,Arial,sans-serif}
body.light.chat-view-active .chat-v1013-theme-setting{background:#fff!important;border-color:#aab6c5!important}
body.light.chat-view-active .chat-v1013-theme-select{background:#fff!important;color:#111827!important}
@media(max-width:1380px){
  .chat-v92-call-surface-row,.chat-v912-media-setting,.chat-v1013-theme-row{grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important}
}

/* ========================================================================== */
/* TEMAS LOCALIZADOS — Chat + Sala                                            */
/* ========================================================================== */
/* Build 10.22: Roxo explícito e novos temas persistentes. */
html[data-gatto-chat-theme="current"] body.chat-view-active{
  --chat-v72-accent:#a832e6;--chat-v72-accent-soft:rgba(168,50,230,.18)
}
html[data-gatto-chat-theme="cyan"] body.chat-view-active{
  --chat-v72-accent:#16c7d9;--chat-v72-accent-soft:rgba(22,199,217,.17)
}
html[data-gatto-chat-theme="green"] body.chat-view-active{
  --chat-v72-accent:#35c978;--chat-v72-accent-soft:rgba(53,201,120,.17)
}
html[data-gatto-chat-theme="amber"] body.chat-view-active{
  --chat-v72-accent:#e0a42b;--chat-v72-accent-soft:rgba(224,164,43,.18)
}
html[data-gatto-chat-theme="red"] body.chat-view-active{
  --chat-v72-accent:#e05262;--chat-v72-accent-soft:rgba(224,82,98,.18)
}
html[data-gatto-chat-theme="current"] .chat-shell,
html[data-gatto-chat-theme="current"] .chat-settings,
html[data-gatto-chat-theme="current"] .gatto-room-shell{--secondary:#c05cf0;--primary:#8f2bc9}
html[data-gatto-chat-theme="cyan"] .chat-shell,
html[data-gatto-chat-theme="cyan"] .chat-settings,
html[data-gatto-chat-theme="cyan"] .gatto-room-shell{--secondary:#31d6e4;--primary:#1599ad}
html[data-gatto-chat-theme="green"] .chat-shell,
html[data-gatto-chat-theme="green"] .chat-settings,
html[data-gatto-chat-theme="green"] .gatto-room-shell{--secondary:#55d991;--primary:#249d5d}
html[data-gatto-chat-theme="amber"] .chat-shell,
html[data-gatto-chat-theme="amber"] .chat-settings,
html[data-gatto-chat-theme="amber"] .gatto-room-shell{--secondary:#efbb4b;--primary:#b77c12}
html[data-gatto-chat-theme="red"] .chat-shell,
html[data-gatto-chat-theme="red"] .chat-settings,
html[data-gatto-chat-theme="red"] .gatto-room-shell{--secondary:#ef6e7c;--primary:#b83345}
html[data-gatto-chat-theme="current"] .gatto-room-shell{--gatto-room-accent:#a832e6;--gatto-room-accent-2:#d18af4;--gatto-room-line-strong:rgba(168,50,230,.62)}
html[data-gatto-chat-theme="cyan"] .gatto-room-shell{--gatto-room-accent:#16b9cc;--gatto-room-accent-2:#6ae5ef;--gatto-room-line-strong:rgba(22,185,204,.62)}
html[data-gatto-chat-theme="green"] .gatto-room-shell{--gatto-room-accent:#31b86e;--gatto-room-accent-2:#80e2aa;--gatto-room-line-strong:rgba(49,184,110,.62)}
html[data-gatto-chat-theme="amber"] .gatto-room-shell{--gatto-room-accent:#d99b20;--gatto-room-accent-2:#f4cb75;--gatto-room-line-strong:rgba(217,155,32,.62)}
html[data-gatto-chat-theme="red"] .gatto-room-shell{--gatto-room-accent:#d64759;--gatto-room-accent-2:#f18d98;--gatto-room-line-strong:rgba(214,71,89,.62)}

html[data-gatto-chat-theme="neutral"] body.chat-view-active{
  --chat-v72-accent:#8da0b4;--chat-v72-accent-soft:rgba(141,160,180,.16)
}
html[data-gatto-chat-theme="blue"] body.chat-view-active{
  --chat-v72-accent:#4d9fe8;--chat-v72-accent-soft:rgba(77,159,232,.16)
}
html[data-gatto-chat-theme="gray"] body.chat-view-active{
  --chat-v72-accent:#8b929c;--chat-v72-accent-soft:rgba(139,146,156,.16)
}
html[data-gatto-chat-theme="neutral"] .chat-shell,
html[data-gatto-chat-theme="neutral"] .chat-settings,
html[data-gatto-chat-theme="neutral"] .gatto-room-shell{--secondary:#8da0b4;--primary:#6f8296}
html[data-gatto-chat-theme="blue"] .chat-shell,
html[data-gatto-chat-theme="blue"] .chat-settings,
html[data-gatto-chat-theme="blue"] .gatto-room-shell{--secondary:#4d9fe8;--primary:#347fc4}
html[data-gatto-chat-theme="gray"] .chat-shell,
html[data-gatto-chat-theme="gray"] .chat-settings,
html[data-gatto-chat-theme="gray"] .gatto-room-shell{--secondary:#8b929c;--primary:#686f79}

html[data-gatto-chat-theme="neutral"] .gatto-room-shell{--gatto-room-accent:#879cad;--gatto-room-accent-2:#a7b5c2;--gatto-room-line-strong:rgba(135,156,173,.62)}
html[data-gatto-chat-theme="blue"] .gatto-room-shell{--gatto-room-accent:#3f95df;--gatto-room-accent-2:#70b7f1;--gatto-room-line-strong:rgba(63,149,223,.62)}
html[data-gatto-chat-theme="gray"] .gatto-room-shell{--gatto-room-accent:#7e858e;--gatto-room-accent-2:#a4aab1;--gatto-room-line-strong:rgba(126,133,142,.62)}

html[data-gatto-chat-theme] .chat-shell .button.primary,
html[data-gatto-chat-theme] .chat-settings .button.primary{
  background:linear-gradient(135deg,var(--primary),var(--secondary))!important;border-color:color-mix(in srgb,var(--secondary) 72%,#fff 8%)!important;color:#fff!important;box-shadow:0 7px 20px color-mix(in srgb,var(--secondary) 24%,transparent)!important
}
html[data-gatto-chat-theme] .gatto-room-control.is-primary,
html[data-gatto-chat-theme] .gatto-room-preentry-enter{
  background:linear-gradient(180deg,color-mix(in srgb,var(--gatto-room-accent) 84%,#fff 4%),color-mix(in srgb,var(--gatto-room-accent) 78%,#000 22%))!important;
  border-color:var(--gatto-room-accent-2)!important;color:#fff!important
}
html[data-gatto-chat-theme] .gatto-room-control:hover,
html[data-gatto-chat-theme] .gatto-room-control-menu:hover{background:color-mix(in srgb,var(--gatto-room-accent) 15%,transparent)!important}
html[data-gatto-chat-theme] .gatto-room-brand-title strong>span,
html[data-gatto-chat-theme] .gatto-room-media-status,
html[data-gatto-chat-theme] .gatto-room-name-text{color:var(--gatto-room-accent-2)!important}
html[data-gatto-chat-theme] .gatto-room-control-icon{color:color-mix(in srgb,var(--gatto-room-accent-2) 58%,#fff 42%)!important}
html[data-gatto-chat-theme] .gatto-room-control.is-off .gatto-room-control-icon,
html[data-gatto-chat-theme] .gatto-room-control.is-danger .gatto-room-control-icon{color:var(--gatto-room-danger)!important}

/* ========================================================================== */
/* CHAT PRIVADO — conteúdo passa por BAIXO das molduras                       */
/* ========================================================================== */
body.chat-view-active .chat-conversation{isolation:isolate!important;overflow:hidden!important}
body.chat-view-active .chat-conversation>#chatMessageList.chat-message-list{
  position:relative!important;z-index:1!important;overflow-x:hidden!important;overflow-y:auto!important;
  clip-path:inset(0)!important;-webkit-clip-path:inset(0)!important;contain:layout paint style!important;isolation:isolate!important
}
body.chat-view-active .chat-conversation>.chat-conversation-header{position:relative!important;z-index:60!important}
body.chat-view-active .chat-conversation>.chat-conversation-boundary-controls{position:relative!important;z-index:60!important}
/* O portal do menu da mensagem continua no body e, portanto, não é recortado. */

/* ========================================================================== */
/* CONTATOS — feedback junto ao contato e opções somente pelo nome            */
/* ========================================================================== */
.chat-contact-row[data-contact-key]{position:relative!important}
.chat-contact-row[data-contact-key]>.chat-contact-options[data-v1013-replaced-by-name="1"]{display:none!important;visibility:hidden!important;pointer-events:none!important}
.chat-v1013-contact-name-options{cursor:pointer!important;text-decoration:none!important;border-radius:5px!important}
.chat-v1013-contact-name-options:hover,.chat-v1013-contact-name-options:focus-visible{
  color:var(--chat-v72-accent,var(--secondary))!important;outline:2px solid color-mix(in srgb,var(--chat-v72-accent,var(--secondary)) 28%,transparent)!important;outline-offset:2px!important
}
.chat-v1013-lock-feedback{
  position:absolute;right:4px;top:50%;z-index:90;max-width:min(180px,58%);transform:translateY(-50%) translateX(4px);
  padding:5px 8px;border:1px solid color-mix(in srgb,var(--chat-v72-accent,var(--secondary)) 42%,var(--chat-v72-line,var(--line)));
  border-radius:999px;background:color-mix(in srgb,var(--chat-v72-panel-2,var(--surface)) 96%,transparent);color:var(--chat-v72-text,var(--text));
  box-shadow:0 7px 20px rgba(0,0,0,.32);font:800 .64rem/1.15 Verdana,Arial,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  opacity:0;pointer-events:none;transition:opacity .14s ease,transform .14s ease
}
.chat-v1013-lock-feedback.is-visible{opacity:1;transform:translateY(-50%) translateX(0)}
.chat-contact-row.chat-v1012-conversation-locked .chat-contact-avatar-button,
.chat-contact-avatar-button.chat-v1012-avatar-locked{outline-color:var(--chat-v72-accent,var(--secondary))!important}
@media(max-width:820px){
  .chat-v1013-lock-feedback{right:2px;max-width:62%;font-size:.61rem;padding:4px 7px}
}
