html:has(.tecsa-messages-page){margin-top:0!important}
body:has(.tecsa-messages-page) #wpadminbar{display:none!important}

body.tc-msg-body-lock{
  overflow:hidden!important;
}

.tecsa-messages-page{
  position:fixed!important;
  inset:0!important;
  z-index:10;
  width:auto!important;
  max-width:none!important;
  height:auto!important;
  min-height:0;
  margin:0!important;
  padding:0 8px 8px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
}

.tecsa-messages-page>.tecsa-center-module-nav{
  flex:0 0 auto;
  margin-bottom:6px;
}

.tc-msg-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:42px;
  margin:0 0 6px;
}

.tc-msg-toolbar-spacer{flex:1 1 auto}
.tc-msg-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.tc-msg-primary,.tc-msg-toolbar button,.tc-msg-bot-status button{
  border:0;
  border-radius:11px;
  min-height:36px;
  padding:0 14px;
  background:linear-gradient(135deg,#2389ff,#1457cc);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.tc-msg-toggle{display:flex;align-items:center;gap:8px;color:#dcecff;font-size:12px;white-space:nowrap}

.tc-msg-bot-status{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  color:#ffe4bd;
  font-size:12px;
}
.tc-msg-bot-status span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-bot-status.is-connected{color:#d6ffeb}
.tc-msg-bot-status button{min-height:32px;padding:0 12px;font-size:12px}

.tc-msg-layout{
  flex:1 1 auto;
  min-width:0;
  min-height:0;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(230px,300px) minmax(0,1fr);
  border:1px solid rgba(112,190,255,.18);
  border-radius:18px;
  overflow:hidden;
  background:rgba(4,20,45,.72);
  box-shadow:0 18px 45px rgba(0,8,25,.24);
}

.tc-msg-sidebar{
  min-height:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(112,190,255,.15);
  background:rgba(6,29,59,.84);
}
.tc-msg-sidebar-title{display:flex;justify-content:space-between;padding:14px 14px 10px;color:#fff;font-weight:850}
.tc-msg-sidebar-title span{display:inline-flex;min-width:22px;height:22px;align-items:center;justify-content:center;border-radius:999px;background:#1978ed;font-size:11px}
.tc-msg-conversations{flex:1 1 auto;min-height:0;overflow:auto;padding:0 8px 10px}
.tc-msg-conversation{width:100%;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 8px;border:0;border-radius:12px;background:transparent;color:#fff;text-align:left;cursor:pointer}
.tc-msg-conversation:hover,.tc-msg-conversation.is-active{background:rgba(53,142,244,.18)}
.tc-msg-conversation-icon{display:flex;width:38px;height:38px;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(145deg,#2797ff,#5945dd);font-weight:900;font-size:13px}
.tc-msg-conversation-copy{min-width:0}
.tc-msg-conversation-copy strong,.tc-msg-conversation-copy em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-conversation-copy strong{font-size:13px;color:#fff}
.tc-msg-conversation-copy em{margin-top:3px;color:rgba(222,236,255,.6);font-size:11px;font-style:normal}
.tc-msg-conversation>b{display:flex;min-width:21px;height:21px;align-items:center;justify-content:center;border-radius:999px;background:#ff3f63;font-size:10px}

.tc-msg-thread{
  min-width:0;
  min-height:0;
  width:100%;
  max-width:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:linear-gradient(160deg,rgba(6,29,59,.82),rgba(8,47,87,.58));
}
.tc-msg-empty-thread{margin:auto;text-align:center;color:#fff}
.tc-msg-empty-thread strong,.tc-msg-empty-thread span{display:block}
.tc-msg-empty-thread span{margin-top:6px;color:rgba(222,236,255,.55)}
.tc-msg-thread-head{flex:0 0 auto;padding:12px 16px;border-bottom:1px solid rgba(112,190,255,.15);background:rgba(5,22,46,.46)}
.tc-msg-thread-head strong,.tc-msg-thread-head span{display:block;color:#fff}
.tc-msg-thread-head span{margin-top:3px;color:rgba(222,236,255,.55);font-size:11px}
.tc-msg-messages{flex:1 1 auto;min-width:0;min-height:0;width:100%;max-width:100%;overflow:auto;padding:14px clamp(14px,2vw,24px);box-sizing:border-box}
.tc-msg-bubble{width:fit-content;max-width:min(960px,88%);margin:0 0 11px;padding:10px 13px;border:1px solid rgba(125,196,255,.16);border-radius:14px 14px 14px 5px;background:rgba(255,255,255,.07);color:#eef7ff}
.tc-msg-bubble.is-mine{margin-left:auto;border-radius:14px 14px 5px 14px;background:linear-gradient(135deg,rgba(29,127,244,.86),rgba(47,92,218,.82))}
.tc-msg-bubble-meta{display:flex;gap:14px;justify-content:space-between;margin-bottom:5px;font-size:10px;color:rgba(232,243,255,.72)}
.tc-msg-bubble-body{line-height:1.42;font-size:14px;overflow-wrap:anywhere}
.tc-msg-bubble>a.tc-msg-action-link{display:inline-flex;margin-top:9px;padding:7px 10px;border-radius:9px;background:#fff;color:#155dc4;text-decoration:none;font-size:11px;font-weight:800}

.tc-msg-attachments{display:grid;gap:6px;margin-top:9px}
.tc-msg-attachment{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;min-width:min(440px,70vw);padding:8px 10px;border:1px solid rgba(164,216,255,.18);border-radius:10px;background:rgba(2,19,43,.34);color:#fff!important;text-decoration:none!important;font-weight:600!important}
.tc-msg-attachment:hover{background:rgba(255,255,255,.1)}
.tc-msg-attachment-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:rgba(61,171,255,.2)}
.tc-msg-attachment-copy{min-width:0}
.tc-msg-attachment-copy strong,.tc-msg-attachment-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-attachment-copy strong{font-size:12px;color:#fff}
.tc-msg-attachment-copy small{margin-top:2px;color:rgba(222,236,255,.62);font-size:10px}
.tc-msg-attachment-download{font-size:15px;color:#76dbff}

.tc-msg-reply{
  flex:0 0 auto;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:end;
  gap:9px;
  padding:10px 12px;
  border-top:1px solid rgba(112,190,255,.15);
  background:rgba(4,18,40,.82);
}
.tc-msg-reply-main{min-width:0}
.tc-msg-reply textarea{display:block;width:100%;min-height:48px;max-height:130px;resize:vertical;border:1px solid rgba(121,196,255,.25);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.07);color:#fff;box-sizing:border-box}
.tc-msg-reply button[type=submit]{min-height:48px;border:0;border-radius:12px;padding:0 18px;background:#2387f2;color:#fff;font-weight:800;cursor:pointer}
.tc-msg-file-button{position:relative;display:grid;place-items:center;width:44px;height:48px;border:1px solid rgba(121,196,255,.25);border-radius:12px;background:rgba(255,255,255,.07);color:#9bdcff;cursor:pointer}
.tc-msg-file-button:hover{background:rgba(35,135,242,.2)}
.tc-msg-file-button input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.tc-msg-selected-files{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px;color:rgba(222,236,255,.75);font-size:11px}
.tc-msg-selected-files span{display:inline-flex;max-width:220px;padding:4px 7px;border-radius:8px;background:rgba(255,255,255,.07);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-reply.is-loading{opacity:.7;pointer-events:none}
.tc-msg-replies-disabled{flex:0 0 auto;padding:13px;text-align:center;color:rgba(222,236,255,.58);border-top:1px solid rgba(112,190,255,.15)}

.tc-msg-modal{position:fixed;inset:0;z-index:100050}
.tc-msg-modal-backdrop{position:absolute;inset:0;background:rgba(0,10,27,.72);backdrop-filter:blur(7px)}
.tc-msg-compose{position:relative;z-index:1;width:min(650px,calc(100% - 28px));max-height:calc(100vh - 30px);overflow:auto;margin:15px auto;padding:18px;border:1px solid rgba(126,199,255,.24);border-radius:18px;background:#09264b;color:#fff;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.tc-msg-compose-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px;font-size:19px}
.tc-msg-compose-head button{border:0;background:transparent;color:#fff;font-size:27px;cursor:pointer}
.tc-msg-compose>label{display:grid;gap:6px;margin:0 0 11px;color:#fff}
.tc-msg-compose label>span{color:#fff}
.tc-msg-compose label>small{color:rgba(222,236,255,.62);font-size:11px}
.tc-msg-compose input,.tc-msg-compose select,.tc-msg-compose textarea{width:100%;box-sizing:border-box;border:1px solid rgba(125,196,255,.25);border-radius:10px;padding:9px 11px;background:#173b66;color:#fff}
.tc-msg-compose input::placeholder,.tc-msg-compose textarea::placeholder{color:rgba(225,239,255,.55)}
.tc-msg-compose select[multiple],.tc-msg-compose select[size]{background:#1d416c;color:#fff;line-height:1.35}
.tc-msg-compose option{color:#fff!important;background:#1d416c!important;padding:4px}
.tc-msg-compose option:checked{background:#247fdc!important;color:#fff!important}
.tc-msg-user-filter{margin-bottom:2px}
.tc-msg-user-filter-note{min-height:14px;color:#8fdcff!important}
.tc-msg-checkbox{display:flex!important;grid-template-columns:none!important;align-items:center;gap:9px}
.tc-msg-checkbox input{width:auto}
.tc-msg-compose-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:15px}
.tc-msg-compose-actions span{margin-right:auto;color:#b9d9ff;font-size:12px}
.tc-msg-compose-actions>button:not(.tc-msg-primary){border:1px solid rgba(125,196,255,.25);border-radius:10px;min-height:36px;padding:0 13px;background:transparent;color:#fff}

.tc-msg-float{position:fixed;right:24px;bottom:24px;z-index:99990}
.tc-msg-float-button{position:relative;width:58px;height:58px;border:0;border-radius:50%;background:linear-gradient(145deg,#2699ff,#5544db);color:#fff;box-shadow:0 18px 42px rgba(21,91,215,.45);cursor:pointer}
.tc-msg-float-logo{font-size:23px;font-weight:900}
.tc-msg-float-badge{position:absolute;right:-3px;top:-3px;display:flex;min-width:21px;height:21px;padding:0 5px;align-items:center;justify-content:center;border:2px solid #081e3b;border-radius:999px;background:#ff365b;font-size:10px;font-weight:900}
.tc-msg-float-panel{position:absolute;right:0;bottom:70px;width:min(360px,calc(100vw - 32px));overflow:hidden;border:1px solid rgba(126,199,255,.23);border-radius:18px;background:#09264b;color:#fff;box-shadow:0 25px 70px rgba(0,0,0,.48)}
.tc-msg-float-head{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border-bottom:1px solid rgba(126,199,255,.15)}
.tc-msg-float-head button{border:0;background:transparent;color:#fff;font-size:22px}
.tc-msg-float-list{max-height:330px;overflow:auto;padding:8px}
.tc-msg-float-list>a{position:relative;display:block;padding:10px 42px 10px 10px;border-radius:11px;color:#fff;text-decoration:none}
.tc-msg-float-list>a:hover{background:rgba(255,255,255,.08)}
.tc-msg-float-list strong,.tc-msg-float-list span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-float-list span{margin-top:3px;color:rgba(222,236,255,.58);font-size:12px}
.tc-msg-float-list b{position:absolute;right:10px;top:18px;display:flex;min-width:22px;height:22px;align-items:center;justify-content:center;border-radius:999px;background:#ff365b;font-size:10px}
.tc-msg-float-open{display:block;padding:12px;text-align:center;border-top:1px solid rgba(126,199,255,.15);color:#8dccff;text-decoration:none;font-weight:800}
.tc-msg-tile-badge{position:absolute;right:16px;top:16px;z-index:3;display:flex;min-width:28px;height:28px;padding:0 7px;align-items:center;justify-content:center;border:2px solid rgba(4,20,45,.78);border-radius:999px;background:#ff365b;color:#fff;font-size:12px;font-weight:900}
.tc-msg-loading,.tc-msg-no-items,.tc-msg-error{padding:18px;color:rgba(222,236,255,.62);text-align:center}

@media(max-width:850px){
  body.tc-msg-body-lock{overflow:auto!important}
  .tecsa-messages-page{height:auto!important;min-height:0;overflow:hidden;padding:0 6px 8px}
  .tc-msg-toolbar{align-items:stretch;flex-direction:column}
  .tc-msg-toolbar-actions{justify-content:flex-start}
  .tc-msg-bot-status{justify-content:space-between}
  .tc-msg-layout{grid-template-columns:1fr;min-height:680px}
  .tc-msg-sidebar{max-height:240px;border-right:0;border-bottom:1px solid rgba(112,190,255,.15)}
  .tc-msg-thread{min-height:480px}
  .tc-msg-bubble{max-width:92%}
  .tc-msg-float{right:14px;bottom:14px}
}

@media(max-width:560px){
  .tc-msg-toolbar-actions{align-items:stretch;flex-direction:column}
  .tc-msg-primary{width:100%}
  .tc-msg-reply{grid-template-columns:auto minmax(0,1fr)}
  .tc-msg-reply button[type=submit]{grid-column:1/-1;width:100%;min-height:40px}
  .tc-msg-attachment{min-width:0;width:100%}
  .tc-msg-compose-actions{align-items:stretch;flex-direction:column}
  .tc-msg-compose-actions span{margin-right:0}
  .tc-msg-compose-actions button{width:100%}
}

/* 0.4.6: previews for image attachments and emoji picker */
.tc-msg-image-attachment{
  appearance:none;
  display:grid;
  grid-template-columns:minmax(120px,220px) minmax(0,1fr);
  align-items:center;
  gap:10px;
  width:min(520px,72vw);
  padding:7px;
  border:1px solid rgba(164,216,255,.2);
  border-radius:12px;
  background:rgba(2,19,43,.34);
  color:#fff;
  text-align:left;
  cursor:pointer;
}
.tc-msg-image-attachment:hover{background:rgba(255,255,255,.1);border-color:rgba(99,203,255,.45)}
.tc-msg-image-attachment img{display:block;width:100%;height:118px;object-fit:contain;border-radius:9px;background:rgba(0,0,0,.2)}
.tc-msg-image-caption{min-width:0}
.tc-msg-image-caption strong,.tc-msg-image-caption small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-image-caption strong{color:#fff;font-size:12px}
.tc-msg-image-caption small{margin-top:4px;color:rgba(222,236,255,.65);font-size:10px}

.tc-msg-image-modal[hidden]{display:none!important}
.tc-msg-image-modal{position:fixed;inset:0;z-index:100200;display:grid;place-items:center;padding:20px}
.tc-msg-image-modal-backdrop{position:absolute;inset:0;background:rgba(0,8,23,.82);backdrop-filter:blur(8px)}
.tc-msg-image-modal-dialog{position:relative;z-index:1;display:flex;flex-direction:column;width:min(1080px,calc(100vw - 34px));max-height:calc(100vh - 34px);overflow:hidden;border:1px solid rgba(126,199,255,.28);border-radius:18px;background:#071d39;box-shadow:0 32px 100px rgba(0,0,0,.62)}
.tc-msg-image-modal-close{position:absolute;right:12px;top:10px;z-index:2;display:grid;place-items:center;width:38px;height:38px;border:1px solid rgba(255,255,255,.18);border-radius:50%;background:rgba(0,10,28,.72);color:#fff;font-size:27px;line-height:1;cursor:pointer}
.tc-msg-image-modal-stage{display:grid;place-items:center;min-height:220px;overflow:auto;padding:18px;background:rgba(0,8,21,.8)}
.tc-msg-image-modal-stage img{display:block;max-width:100%;max-height:calc(100vh - 150px);object-fit:contain}
.tc-msg-image-modal-footer{display:flex;align-items:center;gap:18px;justify-content:space-between;padding:12px 16px;border-top:1px solid rgba(126,199,255,.18);background:#0b2b51}
.tc-msg-image-modal-footer>div{min-width:0}
.tc-msg-image-modal-footer strong,.tc-msg-image-modal-footer small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-image-modal-footer strong{color:#fff;font-size:13px}
.tc-msg-image-modal-footer small{margin-top:3px;color:rgba(222,236,255,.62);font-size:11px}
.tc-msg-image-download{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 16px;border-radius:10px;background:#2387f2;color:#fff!important;text-decoration:none!important;font-weight:800}
body.tc-msg-modal-open{overflow:hidden!important}

.tc-msg-emoji-wrap{position:relative;min-width:0;width:100%}
.tc-msg-emoji-wrap>textarea{padding-right:48px!important}
.tc-msg-emoji-controls{position:absolute;right:8px;bottom:8px;z-index:8}
.tc-msg-emoji-toggle{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid rgba(121,196,255,.25);border-radius:9px;background:rgba(5,31,62,.88);font-size:18px;cursor:pointer}
.tc-msg-emoji-toggle:hover{background:rgba(35,135,242,.28)}
.tc-msg-emoji-panel{position:absolute;right:0;bottom:39px;display:grid;grid-template-columns:repeat(5,34px);gap:5px;padding:8px;border:1px solid rgba(126,199,255,.28);border-radius:12px;background:#0b2d55;box-shadow:0 18px 42px rgba(0,0,0,.45)}
.tc-msg-emoji-panel[hidden]{display:none!important}
.tc-msg-emoji-panel button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;font-size:21px;cursor:pointer}
.tc-msg-emoji-panel button:hover{background:rgba(255,255,255,.12)}

@media(max-width:560px){
  .tc-msg-image-attachment{grid-template-columns:110px minmax(0,1fr);width:100%}
  .tc-msg-image-attachment img{height:88px}
  .tc-msg-image-modal{padding:8px}
  .tc-msg-image-modal-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}
  .tc-msg-image-modal-footer{align-items:stretch;flex-direction:column}
  .tc-msg-image-download{width:100%}
}


/* 0.4.7: live updates, message actions, replies, reactions and aligned composer */
.tc-msg-bubble{
  position:relative;
  padding-right:42px;
  transition:box-shadow .2s ease,border-color .2s ease,background .2s ease;
}
.tc-msg-bubble.is-highlighted{
  border-color:rgba(80,220,255,.9)!important;
  box-shadow:0 0 0 3px rgba(65,202,255,.18),0 12px 34px rgba(0,0,0,.25);
}
.tc-msg-bubble-meta>span{display:flex;align-items:center;gap:7px;white-space:nowrap}
.tc-msg-bubble-meta em{font-size:9px;font-style:normal;color:rgba(232,243,255,.55)}

.tc-msg-message-menu{position:absolute;right:7px;top:6px;z-index:12}
.tc-msg-message-menu-toggle{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:transparent;color:rgba(238,247,255,.72);font-size:22px;line-height:1;cursor:pointer}
.tc-msg-message-menu-toggle:hover{background:rgba(255,255,255,.12);color:#fff}
.tc-msg-message-menu-panel{position:absolute;right:0;top:31px;z-index:30;width:196px;padding:6px;border:1px solid rgba(125,196,255,.25);border-radius:12px;background:#0b2d55;box-shadow:0 18px 46px rgba(0,0,0,.52)}
.tc-msg-message-menu-panel[hidden]{display:none!important}
.tc-msg-message-menu-panel>button{display:block;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:#fff;text-align:left;font-size:12px;cursor:pointer}
.tc-msg-message-menu-panel>button:hover{background:rgba(255,255,255,.1)}
.tc-msg-message-menu-label{display:block;padding:7px 10px 4px;color:rgba(222,236,255,.6);font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.tc-msg-message-reaction-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;padding:2px 5px 5px}
.tc-msg-message-reaction-picker button{display:grid;place-items:center;min-height:34px;padding:0;border:0;border-radius:8px;background:transparent;font-size:22px;cursor:pointer}
.tc-msg-message-reaction-picker button:hover{background:rgba(255,255,255,.12)}

.tc-msg-parent-quote{display:block;width:100%;margin:0 0 8px;padding:7px 9px;border:0;border-left:3px solid #57cfff;border-radius:7px;background:rgba(1,17,39,.27);color:#fff;text-align:left;cursor:pointer}
.tc-msg-parent-quote strong,.tc-msg-parent-quote span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-parent-quote strong{font-size:10px;color:#8ee6ff}
.tc-msg-parent-quote span{margin-top:2px;font-size:11px;color:rgba(236,246,255,.7)}

.tc-msg-reactions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:8px}
.tc-msg-reaction{display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:2px 8px;border:1px solid rgba(126,199,255,.2);border-radius:999px;background:rgba(2,20,44,.35);color:#fff;cursor:pointer}
.tc-msg-reaction:hover,.tc-msg-reaction.is-mine{border-color:rgba(78,204,255,.65);background:rgba(39,142,243,.22)}
.tc-msg-reaction span{font-size:18px;line-height:1}
.tc-msg-reaction b{font-size:10px;color:rgba(234,246,255,.78)}

.tc-msg-edit-form{display:grid;gap:8px;margin-top:3px}
.tc-msg-edit-form textarea{width:100%;min-height:74px;box-sizing:border-box;resize:vertical;padding:9px 10px;border:1px solid rgba(114,205,255,.42);border-radius:10px;background:rgba(1,18,42,.55);color:#fff;font:inherit}
.tc-msg-edit-form>div{display:flex;justify-content:flex-end;gap:7px}
.tc-msg-edit-form button{min-height:32px;padding:0 11px;border:1px solid rgba(126,199,255,.25);border-radius:8px;background:rgba(255,255,255,.08);color:#fff;cursor:pointer}
.tc-msg-edit-form button[type=submit]{border:0;background:#2387f2;font-weight:800}
.tc-msg-edit-form.is-loading{opacity:.65;pointer-events:none}

.tc-msg-reply{
  align-items:stretch;
}
.tc-msg-reply-main{display:flex;flex-direction:column;min-width:0}
.tc-msg-reply-main>.tc-msg-emoji-wrap{flex:1 1 auto;min-height:52px}
.tc-msg-reply-main>.tc-msg-emoji-wrap>textarea{height:100%;min-height:52px}
.tc-msg-file-button{align-self:stretch;width:48px;height:auto;min-height:52px;font-size:20px}
.tc-msg-reply button[type=submit]{align-self:stretch;height:auto;min-height:52px}
.tc-msg-reply-target{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px;padding:7px 8px;border-left:3px solid #57cfff;border-radius:8px;background:rgba(30,122,220,.13)}
.tc-msg-reply-target[hidden]{display:none!important}
.tc-msg-reply-target>div{min-width:0}
.tc-msg-reply-target strong,.tc-msg-reply-target span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-reply-target strong{font-size:10px;color:#92e8ff}
.tc-msg-reply-target span{margin-top:2px;font-size:11px;color:rgba(231,244,255,.7)}
.tc-msg-reply-target>button{flex:0 0 auto;width:26px;height:26px;padding:0;border:0;border-radius:7px;background:rgba(255,255,255,.08);color:#fff;font-size:18px;cursor:pointer}

/* Emoji picker is intentionally large enough for quick selection. */
.tc-msg-emoji-wrap>textarea{padding-right:58px!important}
.tc-msg-emoji-controls{right:8px;bottom:8px}
.tc-msg-emoji-toggle{width:40px;height:40px;border-radius:10px;font-size:27px}
.tc-msg-emoji-panel{right:0;bottom:47px;grid-template-columns:repeat(5,46px);gap:5px;padding:9px}
.tc-msg-emoji-panel button{width:46px;height:46px;border-radius:9px;font-size:32px}

@media(max-width:560px){
  .tc-msg-message-menu-panel{position:fixed;right:12px;top:auto;bottom:84px;width:min(260px,calc(100vw - 24px))}
  .tc-msg-message-reaction-picker{grid-template-columns:repeat(8,1fr)}
  .tc-msg-message-reaction-picker button{font-size:20px}
  .tc-msg-emoji-panel{grid-template-columns:repeat(4,46px)}
}
.tc-msg-bubble:nth-last-child(-n+2) .tc-msg-message-menu-panel{top:auto;bottom:31px}


/* 0.4.8: larger emoji in messages, right-click menus and member management */
.tc-msg-inline-emoji{
  display:inline-block;
  margin:0 .025em;
  font-size:2em;
  line-height:.78;
  vertical-align:-.18em;
}

.tc-msg-message-menu-panel.is-context{
  position:fixed!important;
  z-index:100120!important;
  right:auto!important;
  bottom:auto!important;
}

.tc-msg-conversation-context-menu{
  position:fixed;
  z-index:100130;
  width:190px;
  padding:6px;
  border:1px solid rgba(125,196,255,.28);
  border-radius:12px;
  background:#0b2d55;
  box-shadow:0 18px 48px rgba(0,0,0,.55);
}
.tc-msg-conversation-context-menu[hidden]{display:none!important}
.tc-msg-conversation-context-menu button{
  width:100%;
  min-height:38px;
  padding:0 11px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#ffccd4;
  text-align:left;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.tc-msg-conversation-context-menu button:hover{background:rgba(255,95,123,.14)}

.tc-msg-thread-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.tc-msg-thread-title{min-width:0}
.tc-msg-thread-title strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tc-msg-thread-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex:0 0 auto;
}
.tc-msg-thread-head-actions span{
  display:inline!important;
  margin:0!important;
  white-space:nowrap;
}
.tc-msg-thread-head-actions button{
  min-height:30px;
  padding:0 10px;
  border:1px solid rgba(112,203,255,.28);
  border-radius:9px;
  background:rgba(35,135,242,.18);
  color:#a9e8ff;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.tc-msg-thread-head-actions button:hover{background:rgba(35,135,242,.32);color:#fff}

.tc-msg-members-modal{
  position:fixed;
  inset:0;
  z-index:100110;
}
.tc-msg-members-modal[hidden]{display:none!important}
.tc-msg-members-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,10,27,.74);
  backdrop-filter:blur(7px);
}
.tc-msg-members-dialog{
  position:relative;
  z-index:1;
  width:min(680px,calc(100% - 28px));
  max-height:calc(100vh - 30px);
  overflow:auto;
  margin:15px auto;
  padding:18px;
  border:1px solid rgba(126,199,255,.25);
  border-radius:18px;
  background:#09264b;
  color:#fff;
  box-shadow:0 30px 80px rgba(0,0,0,.52);
}
.tc-msg-members-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  font-size:19px;
}
.tc-msg-members-head button{
  width:34px;
  height:34px;
  padding:0;
  border:0;
  border-radius:9px;
  background:rgba(255,255,255,.07);
  color:#fff;
  font-size:24px;
  cursor:pointer;
}
.tc-msg-members-dialog>label{
  display:grid;
  gap:6px;
  margin-bottom:12px;
}
.tc-msg-members-dialog input,
.tc-msg-members-dialog select{
  width:100%;
  box-sizing:border-box;
  padding:9px 11px;
  border:1px solid rgba(125,196,255,.26);
  border-radius:10px;
  background:#173b66;
  color:#fff;
}
.tc-msg-members-dialog select{line-height:1.35}
.tc-msg-members-dialog option{background:#1d416c;color:#fff;padding:4px}
.tc-msg-members-dialog>small{display:block;min-height:16px;color:#8fdcff}
.tc-msg-members-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  margin-top:15px;
}
.tc-msg-members-actions span{margin-right:auto;color:#b9d9ff;font-size:12px}
.tc-msg-members-actions button{
  min-height:38px;
  padding:0 14px;
  border:1px solid rgba(125,196,255,.25);
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
}
.tc-msg-members-actions button[type=submit]{border:0;background:#2387f2;font-weight:800}
.tc-msg-members-dialog.is-loading{opacity:.68;pointer-events:none}

@media(max-width:680px){
  .tc-msg-thread-head{align-items:flex-start;flex-direction:column;gap:7px}
  .tc-msg-thread-head-actions{width:100%;justify-content:space-between}
  .tc-msg-members-actions{align-items:stretch;flex-direction:column}
  .tc-msg-members-actions span{margin:0}
}

/* 0.4.9: mentions, participant picker, history access and Bitrix24 avatars */
.tc-msg-bubble{
  max-width:min(960px,calc(88% - 48px));
  margin-left:48px;
}
.tc-msg-bubble.is-mine{
  margin-left:auto;
  margin-right:48px;
}
.tc-msg-bubble.is-mentioned{
  border-color:rgba(255,205,92,.7);
  box-shadow:0 0 0 2px rgba(255,196,62,.1),0 12px 32px rgba(0,0,0,.2);
}
.tc-msg-avatar{
  position:relative;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  width:36px;
  height:36px;
  overflow:hidden;
  border:1px solid rgba(139,211,255,.32);
  border-radius:50%;
  background:linear-gradient(145deg,#238cff,#5844db);
  color:#fff;
  box-shadow:0 8px 20px rgba(0,0,0,.22);
}
.tc-msg-avatar b{font-size:11px;line-height:1;font-weight:900}
.tc-msg-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.tc-msg-avatar.is-small{width:30px;height:30px;box-shadow:none}
.tc-msg-avatar.is-small b{font-size:9px}
.tc-msg-bubble-avatar{
  position:absolute;
  left:-46px;
  bottom:2px;
}
.tc-msg-bubble.is-mine .tc-msg-bubble-avatar{
  left:auto;
  right:-46px;
}
.tc-msg-mention{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  margin:0 2px;
  padding:1px 7px;
  border:1px solid rgba(115,211,255,.32);
  border-radius:999px;
  background:rgba(57,165,255,.18);
  color:#9be8ff;
  font-weight:850;
  white-space:nowrap;
}
.tc-msg-mention.is-current-user{
  border-color:rgba(255,207,95,.65);
  background:rgba(255,184,55,.16);
  color:#ffe4a0;
}

.tc-msg-thread-head{position:relative;z-index:35;overflow:visible}
.tc-msg-thread-head-actions{position:relative;overflow:visible}
.tc-msg-participants{position:relative;z-index:45}
.tc-msg-participants-toggle{
  min-height:30px!important;
  border:0!important;
  background:transparent!important;
  color:rgba(222,236,255,.66)!important;
  font-weight:700!important;
}
.tc-msg-participants-toggle:hover{color:#fff!important;background:rgba(255,255,255,.07)!important}
.tc-msg-participants-popover{
  position:absolute;
  top:calc(100% + 7px);
  right:0;
  z-index:100;
  width:min(360px,70vw);
  max-height:390px;
  padding:8px;
  border:1px solid rgba(126,199,255,.28);
  border-radius:13px;
  background:#0a2b52;
  box-shadow:0 20px 54px rgba(0,0,0,.55);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-5px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease;
}
.tc-msg-participants:hover .tc-msg-participants-popover,
.tc-msg-participants.is-open .tc-msg-participants-popover{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.tc-msg-participants-hint{
  padding:5px 7px 8px;
  color:rgba(217,235,255,.63);
  font-size:10px;
  line-height:1.35;
}
.tc-msg-participants-list{display:grid;gap:3px;max-height:330px;overflow:auto}
.tc-msg-participants-list>button{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  min-height:43px;
  padding:6px 8px!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#fff!important;
  text-align:left;
}
.tc-msg-participants-list>button:hover,
.tc-msg-participants-list>button.is-selected{background:rgba(52,151,255,.2)!important}
.tc-msg-participants-list>button>span{min-width:0}
.tc-msg-participants-list strong,.tc-msg-participants-list small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-participants-list strong{font-size:12px;color:#fff}
.tc-msg-participants-list small{margin-top:2px;color:rgba(222,236,255,.58);font-size:10px}

.tc-msg-reply-main{position:relative}
.tc-msg-mention-autocomplete{
  position:absolute;
  left:0;
  right:0;
  bottom:calc(100% + 7px);
  z-index:90;
  max-height:300px;
  overflow:auto;
  padding:6px;
  border:1px solid rgba(126,199,255,.3);
  border-radius:13px;
  background:#0b2d55;
  box-shadow:0 20px 52px rgba(0,0,0,.52);
}
.tc-msg-mention-autocomplete>button{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  min-height:42px;
  padding:6px 8px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#fff;
  text-align:left;
  cursor:pointer;
}
.tc-msg-mention-autocomplete>button:hover,
.tc-msg-mention-autocomplete>button.is-active{background:rgba(47,151,255,.22)}
.tc-msg-mention-autocomplete>button>span{min-width:0}
.tc-msg-mention-autocomplete strong,.tc-msg-mention-autocomplete small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-mention-autocomplete strong{font-size:12px}
.tc-msg-mention-autocomplete small{margin-top:2px;color:rgba(222,236,255,.58);font-size:10px}

.tc-msg-members-history{
  display:flex!important;
  grid-template-columns:none!important;
  align-items:flex-start;
  gap:9px!important;
  padding:10px 11px;
  border:1px solid rgba(125,196,255,.18);
  border-radius:10px;
  background:rgba(255,255,255,.045);
  cursor:pointer;
}
.tc-msg-members-history input{width:auto!important;margin-top:2px}
.tc-msg-members-history span{color:#e7f3ff;font-size:12px;line-height:1.35}

@media(max-width:680px){
  .tc-msg-bubble{max-width:calc(100% - 40px);margin-left:38px}
  .tc-msg-bubble.is-mine{margin-left:auto;margin-right:38px}
  .tc-msg-bubble-avatar{left:-38px;width:30px;height:30px}
  .tc-msg-bubble.is-mine .tc-msg-bubble-avatar{right:-38px}
  .tc-msg-participants-popover{position:fixed;top:68px;left:10px;right:10px;width:auto;max-height:calc(100vh - 145px)}
}
.tc-msg-thread-head-actions .tc-msg-avatar{display:inline-grid!important;margin:0!important}
.tc-msg-thread-head-actions .tc-msg-participants-list>button>span,
.tc-msg-thread-head-actions .tc-msg-mention-autocomplete>button>span{display:block!important;margin:0!important}

/* 0.4.10: reaction avatars and full-text chat search */
.tc-msg-reaction-users{
  display:inline-flex!important;
  align-items:center;
  margin:0 0 0 2px!important;
  padding-left:2px;
}
.tc-msg-reaction-avatar{
  width:19px!important;
  height:19px!important;
  margin-left:-5px!important;
  border:2px solid #0b2b51!important;
  box-shadow:none!important;
}
.tc-msg-reaction-avatar:first-child{margin-left:0!important}
.tc-msg-reaction-avatar b{font-size:6px!important}
.tc-msg-reaction-more{
  display:inline-grid!important;
  place-items:center;
  width:19px;
  height:19px;
  margin:0 0 0 -4px!important;
  border:2px solid #0b2b51;
  border-radius:50%;
  background:#226dbb;
  color:#fff!important;
  font-size:7px!important;
  font-weight:900;
  line-height:1;
}

.tc-msg-search-control{position:relative;z-index:120}
.tc-msg-search-toggle{
  width:34px;
  min-width:34px;
  padding:0!important;
  font-size:15px!important;
}
.tc-msg-search-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:140;
  display:grid;
  grid-template-columns:minmax(190px,320px) auto auto;
  align-items:center;
  gap:8px;
  width:min(720px,calc(100vw - 80px));
  padding:9px;
  border:1px solid rgba(126,199,255,.3);
  border-radius:13px;
  background:#0a2b52;
  box-shadow:0 20px 54px rgba(0,0,0,.55);
  animation:tc-msg-search-slide .16s ease-out;
}
.tc-msg-search-panel[hidden]{display:none!important}
@keyframes tc-msg-search-slide{
  from{opacity:0;transform:translateY(-7px)}
  to{opacity:1;transform:translateY(0)}
}
.tc-msg-search-panel input[type=search]{
  width:100%;
  min-width:0;
  height:36px;
  padding:0 11px;
  border:1px solid rgba(126,199,255,.3);
  border-radius:9px;
  outline:0;
  background:#173d69;
  color:#fff;
  font:inherit;
  font-size:12px;
}
.tc-msg-search-panel input[type=search]:focus{border-color:#55cfff;box-shadow:0 0 0 2px rgba(85,207,255,.12)}
.tc-msg-search-panel label{
  display:flex;
  align-items:center;
  gap:6px;
  color:#e2f0ff;
  font-size:11px;
  white-space:nowrap;
}
.tc-msg-search-panel label input{width:auto;margin:0}
.tc-msg-search-panel button[type=submit]{height:36px;padding:0 14px;background:#2387f2;color:#fff}
.tc-msg-search-panel.is-loading{opacity:.68;pointer-events:none}

.tc-msg-search-results-modal{
  position:fixed;
  inset:0;
  z-index:100160;
  display:grid;
  place-items:center;
  padding:18px;
}
.tc-msg-search-results-modal[hidden]{display:none!important}
.tc-msg-search-results-backdrop{position:absolute;inset:0;background:rgba(0,8,23,.78);backdrop-filter:blur(7px)}
.tc-msg-search-results-dialog{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  width:min(900px,calc(100vw - 36px));
  max-height:min(760px,calc(100vh - 36px));
  overflow:hidden;
  border:1px solid rgba(126,199,255,.3);
  border-radius:17px;
  background:#071d39;
  box-shadow:0 30px 90px rgba(0,0,0,.62);
}
.tc-msg-search-results-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 15px;
  border-bottom:1px solid rgba(126,199,255,.18);
  background:#0b2b51;
}
.tc-msg-search-results-head strong,.tc-msg-search-results-head small{display:block}
.tc-msg-search-results-head strong{color:#fff;font-size:15px}
.tc-msg-search-results-head small{margin-top:3px;color:rgba(222,236,255,.62);font-size:10px}
.tc-msg-search-results-head>button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;background:rgba(255,255,255,.08);color:#fff;font-size:23px;cursor:pointer}
.tc-msg-search-results-list{display:grid;gap:7px;min-height:160px;overflow:auto;padding:11px}
.tc-msg-search-result{
  display:flex;
  align-items:flex-start;
  gap:11px;
  width:100%;
  padding:11px;
  border:1px solid rgba(126,199,255,.16);
  border-radius:12px;
  background:rgba(16,54,96,.62);
  color:#fff;
  text-align:left;
  cursor:pointer;
}
.tc-msg-search-result:hover{border-color:rgba(82,207,255,.55);background:rgba(31,103,174,.46)}
.tc-msg-search-result-copy{display:block;min-width:0;flex:1 1 auto}
.tc-msg-search-result-top{display:flex!important;align-items:center;justify-content:space-between;gap:12px;margin:0 0 3px!important}
.tc-msg-search-result-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff;font-size:13px}
.tc-msg-search-result-top time{flex:0 0 auto;color:rgba(222,236,255,.54);font-size:9px}
.tc-msg-search-result-copy>small{display:block;margin-bottom:6px;color:#8bdcff;font-size:10px}
.tc-msg-search-result-text{display:block!important;margin:0!important;color:rgba(239,247,255,.82)!important;font-size:12px!important;line-height:1.42;white-space:normal!important;overflow-wrap:anywhere}
.tc-msg-search-result-text mark{padding:0 2px;border-radius:3px;background:#ffd55a;color:#14233a;font-weight:850}
.tc-msg-search-empty{padding:46px 20px;color:rgba(222,236,255,.65);text-align:center}
.tc-msg-bubble.is-search-target{border-color:#ffd55a!important;box-shadow:0 0 0 3px rgba(255,213,90,.18),0 12px 34px rgba(0,0,0,.25)}

@media(max-width:760px){
  .tc-msg-search-panel{position:fixed;top:62px;left:10px;right:10px;width:auto;grid-template-columns:1fr}
  .tc-msg-search-panel label{white-space:normal}
  .tc-msg-search-results-modal{padding:8px}
  .tc-msg-search-results-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}
}

/* 0.5.5 — единый выбор получателей как в модуле видеоконференций */
.tc-msg-compose{
  width:min(960px,calc(100% - 28px));
  max-height:calc(100dvh - 30px);
}
.tc-msg-compose[hidden],.tc-msg-compose [hidden]{display:none!important}
.tc-msg-recipient-toolbar{
  position:relative;
  z-index:12;
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 13px;
}
.tc-msg-recipient-toolbar>input{
  flex:1 1 auto;
  min-width:0;
  margin:0;
}
.tc-msg-selection-summary{position:relative;flex:0 0 auto}
.tc-msg-selected-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 13px;
  border:1px solid rgba(102,207,255,.28);
  border-radius:10px;
  background:rgba(34,132,196,.18);
  color:#83ddff;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.tc-msg-selected-count:hover,.tc-msg-selection-summary.is-open .tc-msg-selected-count{
  border-color:rgba(102,207,255,.58);
  background:rgba(34,132,196,.3);
}
.tc-msg-selection-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:130;
  display:grid;
  gap:9px;
  width:min(380px,calc(100vw - 48px));
  max-height:min(460px,calc(100dvh - 170px));
  padding:13px;
  overflow:auto;
  border:1px solid rgba(102,207,255,.34);
  border-radius:14px;
  background:#061f3e;
  box-shadow:0 22px 65px rgba(0,0,0,.55);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-5px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease;
}
.tc-msg-selection-summary.is-open .tc-msg-selection-popover,
.tc-msg-selection-summary:focus-within .tc-msg-selection-popover{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.tc-msg-selection-popover>strong{font-size:13px;color:#fff}
.tc-msg-selection-list{display:grid;gap:7px;min-height:35px;max-height:330px;overflow:auto}
.tc-msg-selection-list>p{
  margin:0;
  padding:10px;
  border-radius:10px;
  background:rgba(255,255,255,.04);
  color:#8faec7;
  font-size:11px;
  text-align:center;
}
.tc-msg-selection-person{
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 28px;
  align-items:center;
  gap:9px;
  padding:7px 8px;
  border:1px solid rgba(102,207,255,.14);
  border-radius:10px;
  background:rgba(255,255,255,.035);
}
.tc-msg-selection-person>span:nth-child(2){min-width:0}
.tc-msg-selection-person strong,.tc-msg-selection-person small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-selection-person strong{font-size:11px;color:#eef9ff}
.tc-msg-selection-person small{margin-top:2px;font-size:9px;color:#83a9c2}
.tc-msg-selection-person>button{
  width:28px;
  height:28px;
  padding:0;
  border:0;
  border-radius:8px;
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:19px;
  cursor:pointer;
}
.tc-msg-recipient-columns{
  display:grid;
  grid-template-columns:minmax(240px,.78fr) minmax(380px,1.22fr);
  gap:14px;
  margin:0 0 13px;
}
.tc-msg-recipient-columns>section{
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(102,207,255,.17);
  border-radius:14px;
  background:rgba(1,18,40,.48);
}
.tc-msg-recipient-columns h3{
  margin:0;
  padding:12px 14px;
  border-bottom:1px solid rgba(102,207,255,.13);
  color:#fff;
  font-size:14px;
  font-weight:850;
}
.tc-msg-recipient-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:43px;
  padding-right:9px;
  border-bottom:1px solid rgba(102,207,255,.13);
}
.tc-msg-recipient-section-head h3{min-width:0;overflow:hidden;border:0;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-recipient-head-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.tc-msg-recipient-section-head button{
  min-height:30px;
  padding:0 9px;
  border:1px solid rgba(102,207,255,.24);
  border-radius:9px;
  background:rgba(29,116,196,.35);
  color:#dff5ff;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}
.tc-msg-select-all{
  display:flex!important;
  align-items:center;
  gap:6px;
  margin:0!important;
  color:#cdeeff!important;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.tc-msg-select-all input{width:16px!important;height:16px;margin:0;padding:0;accent-color:#2a9cff}
.tc-msg-recipient-list{
  display:grid;
  align-content:start;
  gap:6px;
  height:min(285px,32dvh);
  max-height:min(285px,32dvh);
  overflow:auto;
  padding:9px;
}
.tc-msg-recipient-item{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:9px;
  border:1px solid transparent;
  border-radius:11px;
  background:rgba(255,255,255,.035);
  color:#fff;
}
.tc-msg-recipient-item:hover{border-color:rgba(102,207,255,.22);background:rgba(52,155,225,.1)}
.tc-msg-recipient-item[hidden]{display:none!important}
.tc-msg-recipient-item>input{flex:0 0 17px;width:17px;height:17px;margin:0;padding:0;accent-color:#2a9cff}
.tc-msg-recipient-item>input:disabled{opacity:.35}
.tc-msg-recipient-item>span:last-child{min-width:0}
.tc-msg-recipient-item strong,.tc-msg-recipient-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-recipient-item strong{color:#eaf8ff;font-size:12px}
.tc-msg-recipient-item small{margin-top:2px;color:#86a9c1;font-size:10px}
.tc-msg-department-row{padding:0 9px}
.tc-msg-recipient-open{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex:1 1 auto;
  min-width:0;
  min-height:54px;
  padding:7px 2px;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.tc-msg-recipient-open>span{min-width:0}
.tc-msg-recipient-open>b{color:#6edaff;font-size:26px;line-height:1;transition:transform .14s ease}
.tc-msg-department-row.is-active{border-color:rgba(94,205,255,.48);background:rgba(38,139,215,.16)}
.tc-msg-department-row.is-selected{border-color:rgba(71,224,169,.3)}
.tc-msg-department-row.is-partial{border-color:rgba(255,205,94,.34)}
.tc-msg-department-row:hover .tc-msg-recipient-open>b,.tc-msg-department-row.is-active .tc-msg-recipient-open>b{transform:translateX(2px)}
.tc-msg-recipient-avatar,.tc-msg-selection-avatar{
  flex:0 0 34px;
  width:34px;
  height:34px;
  box-shadow:none;
}
.tc-msg-selection-avatar{flex-basis:30px;width:30px;height:30px}
.tc-msg-recipient-empty{padding:14px;color:#88aac2;font-size:11px;text-align:center}
.tc-msg-recipient-limit{display:block;margin:-5px 0 12px;color:#ffd59b;font-size:10px}
.tc-msg-chat-title{margin-bottom:13px!important;padding:11px 12px;border:1px solid rgba(102,207,255,.18);border-radius:13px;background:rgba(1,18,40,.38)}
.tc-msg-compose.is-loading{opacity:.7;pointer-events:none}
.tc-msg-conversation-avatar{width:38px;height:38px;box-shadow:none}
.tc-msg-conversation-avatar b{font-size:11px}
.tc-msg-conversation-icon img{width:100%;height:100%;object-fit:cover}

@media(max-width:760px){
  .tc-msg-compose{width:calc(100% - 12px);max-height:calc(100dvh - 12px);margin:6px auto;padding:14px}
  .tc-msg-recipient-toolbar{align-items:stretch;flex-direction:column}
  .tc-msg-selection-summary,.tc-msg-selected-count{width:100%}
  .tc-msg-selection-popover{right:0;left:0;width:auto}
  .tc-msg-recipient-columns{grid-template-columns:1fr}
  .tc-msg-recipient-list{height:220px;max-height:220px}
  .tc-msg-recipient-section-head{align-items:flex-start;flex-direction:column;padding:8px 9px}
  .tc-msg-recipient-section-head h3{padding:0}
}
.tc-msg-float-badge[hidden],.tc-msg-tile-badge[hidden]{display:none!important}

/* 0.6.0 — mobile Bitrix24 application layout. */
.tecsa-center-mobile .tecsa-messages-page {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 0 4px calc(4px + env(safe-area-inset-bottom));
  overflow: hidden !important;
}

.tecsa-center-mobile .tecsa-messages-page > .tecsa-center-module-nav {
  margin: 0 -4px 5px;
  width: calc(100% + 8px);
}

.tecsa-center-mobile .tc-msg-toolbar {
  min-height: 40px;
  margin-bottom: 5px;
  padding: 0 2px;
  flex-direction: row;
  align-items: center;
}

.tecsa-center-mobile .tc-msg-bot-status,
.tecsa-center-mobile .tc-msg-toolbar-spacer {
  display: none;
}

.tecsa-center-mobile .tc-msg-toolbar-actions {
  width: 100%;
  justify-content: stretch;
}

.tecsa-center-mobile .tc-msg-toolbar-actions .tc-msg-primary {
  width: 100%;
  min-height: 38px;
}

.tecsa-center-mobile .tc-msg-layout {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(150px, 34dvh) minmax(0, 1fr);
  border-radius: 13px;
}

.tecsa-center-mobile .tc-msg-sidebar {
  max-height: none;
  min-height: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(112,190,255,.15);
}

.tecsa-center-mobile .tc-msg-sidebar-title {
  padding: 9px 10px 7px;
  font-size: 13px;
}

.tecsa-center-mobile .tc-msg-conversations {
  padding: 0 5px 7px;
}

.tecsa-center-mobile .tc-msg-conversation {
  grid-template-columns: 36px minmax(0,1fr) auto;
  min-height: 51px;
  padding: 6px;
}

.tecsa-center-mobile .tc-msg-conversation-icon,
.tecsa-center-mobile .tc-msg-conversation-avatar {
  width: 34px;
  height: 34px;
}

.tecsa-center-mobile .tc-msg-thread {
  min-height: 0;
}

.tecsa-center-mobile .tc-msg-thread-head {
  padding: 8px 10px;
}

.tecsa-center-mobile .tc-msg-messages {
  padding: 10px 8px;
}

.tecsa-center-mobile .tc-msg-bubble {
  max-width: 94%;
  padding: 9px 38px 9px 10px;
}

.tecsa-center-mobile .tc-msg-reply {
  grid-template-columns: 42px minmax(0,1fr) 48px;
  gap: 6px;
  padding: 7px;
}

.tecsa-center-mobile .tc-msg-file-button,
.tecsa-center-mobile .tc-msg-reply button[type=submit] {
  min-height: 46px;
}

.tecsa-center-mobile .tc-msg-reply button[type=submit] {
  grid-column: auto;
  width: auto;
  padding: 0 12px;
  font-size: 0;
}

.tecsa-center-mobile .tc-msg-reply button[type=submit]::after {
  content: "➤";
  font-size: 18px;
}

.tecsa-center-mobile .tc-msg-compose {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 10px calc(14px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
}

.tecsa-center-mobile .tc-msg-recipient-list {
  height: min(210px, 27dvh);
  max-height: min(210px, 27dvh);
}

.tecsa-center-mobile .tc-msg-selection-popover {
  position: fixed;
  top: 74px;
  right: 10px;
  left: 10px;
  width: auto;
  max-height: calc(100dvh - 90px);
}

@media (max-width: 430px) {
  .tecsa-center-mobile .tc-msg-layout {
    grid-template-rows: minmax(132px, 30dvh) minmax(0, 1fr);
  }
  .tecsa-center-mobile .tc-msg-reply {
    grid-template-columns: 40px minmax(0,1fr) 46px;
  }
}

/* 0.7.3 — mobile-first corporate messages. */
.tc-msg-mobile-header,
.tc-msg-mobile-list-tools,
.tc-msg-mobile-thread-back,
.tc-msg-mobile-thread-loading {
  display:none;
}
.tc-msg-thread-identity{display:flex;align-items:center;gap:10px;min-width:0}
.tc-msg-thread-group-icon{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:50%;background:linear-gradient(145deg,#2797ff,#5945dd);color:#fff;font-size:12px;font-weight:900}
.tc-msg-conversation-line{display:flex;align-items:center;gap:8px;min-width:0}
.tc-msg-conversation-line strong{flex:1 1 auto;min-width:0}
.tc-msg-conversation-line time{flex:0 0 auto;color:rgba(214,233,255,.48);font-size:10px;font-style:normal;font-weight:650}
.tc-msg-conversation-chevron{color:rgba(190,220,255,.35);font-size:24px;line-height:1}
.tc-msg-no-items{display:grid;place-items:center;align-content:center;gap:7px;min-height:220px;padding:28px;text-align:center;color:rgba(222,236,255,.58)}
.tc-msg-no-items>span{font-size:34px;filter:saturate(.85)}
.tc-msg-no-items>strong{color:#f4f9ff;font-size:15px}
.tc-msg-no-items>small{max-width:280px;line-height:1.45}

.tecsa-center-mobile .tecsa-messages-page {
  --tc-msg-panel:#071f3d;
  --tc-msg-panel-2:#0b2b51;
  --tc-msg-line:rgba(112,190,255,.16);
  --tc-msg-text:#f6f9ff;
  --tc-msg-muted:#8eaac9;
  --tc-msg-accent:#349cff;
  --tc-msg-danger:#ef4665;
  position:fixed!important;
  inset:var(--tc-msg-viewport-top,0) 0 auto 0!important;
  z-index:1000!important;
  width:100%!important;
  height:var(--tc-msg-mobile-height,100dvh)!important;
  max-width:none!important;
  min-height:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 88% -12%,rgba(43,151,255,.19),transparent 34%),
    linear-gradient(180deg,#061a32 0%,#05162b 100%)!important;
  color:var(--tc-msg-text);
  overscroll-behavior:none;
  touch-action:pan-y;
}
.tecsa-center-mobile .tecsa-messages-page>.tecsa-center-module-nav,
.tecsa-center-mobile .tecsa-messages-page>.tc-msg-toolbar{display:none!important}
.tecsa-center-mobile .tc-msg-mobile-header{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  min-height:62px;
  padding:max(8px,env(safe-area-inset-top)) 12px 8px;
  border-bottom:1px solid var(--tc-msg-line);
  background:rgba(5,22,43,.94);
  backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  box-sizing:border-box;
}
.tecsa-center-mobile .tecsa-messages-page.is-thread-open>.tc-msg-mobile-header{display:none}
.tecsa-center-mobile .tc-msg-mobile-home,
.tecsa-center-mobile .tc-msg-mobile-new,
.tecsa-center-mobile .tc-msg-mobile-thread-back{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid rgba(123,195,255,.22);
  border-radius:14px;
  background:linear-gradient(145deg,rgba(30,77,127,.78),rgba(14,49,87,.88));
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  text-decoration:none;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.tecsa-center-mobile .tc-msg-mobile-new{background:linear-gradient(145deg,#3ca7ff,#176bd9);border-color:rgba(114,204,255,.45)}
.tecsa-center-mobile .tc-msg-mobile-home svg,
.tecsa-center-mobile .tc-msg-mobile-new svg,
.tecsa-center-mobile .tc-msg-mobile-thread-back svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tecsa-center-mobile .tc-msg-mobile-heading{min-width:0}
.tecsa-center-mobile .tc-msg-mobile-heading strong,
.tecsa-center-mobile .tc-msg-mobile-heading span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tecsa-center-mobile .tc-msg-mobile-heading strong{font-size:18px;line-height:1.18;letter-spacing:-.015em}
.tecsa-center-mobile .tc-msg-mobile-heading span{margin-top:3px;color:var(--tc-msg-muted);font-size:11px}
.tecsa-center-mobile .tc-msg-mobile-header-spacer{width:42px;height:42px}

.tecsa-center-mobile .tc-msg-layout{
  position:relative;
  display:block!important;
  flex:1 1 auto;
  width:100%;
  min-height:0;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
  background:transparent!important;
  box-shadow:none!important;
}
.tecsa-center-mobile .tc-msg-sidebar,
.tecsa-center-mobile .tc-msg-thread{
  position:absolute;
  inset:0;
  width:100%;
  min-width:0;
  min-height:0;
  border:0!important;
  background:transparent!important;
  transition:transform .24s cubic-bezier(.22,.78,.2,1),opacity .2s ease;
  will-change:transform;
}
.tecsa-center-mobile .tc-msg-sidebar{display:flex;transform:translateX(0);opacity:1;pointer-events:auto}
.tecsa-center-mobile .tc-msg-thread{display:flex;transform:translateX(102%);opacity:.2;pointer-events:none}
.tecsa-center-mobile .tecsa-messages-page.is-thread-open .tc-msg-sidebar{transform:translateX(-24%);opacity:0;pointer-events:none}
.tecsa-center-mobile .tecsa-messages-page.is-thread-open .tc-msg-thread{transform:translateX(0);opacity:1;pointer-events:auto}

.tecsa-center-mobile .tc-msg-mobile-list-tools{display:block;flex:0 0 auto;padding:12px 12px 6px}
.tecsa-center-mobile .tc-msg-mobile-search{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:8px;min-height:48px;padding:0 13px;border:1px solid rgba(112,190,255,.17);border-radius:16px;background:rgba(12,45,82,.67);box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.tecsa-center-mobile .tc-msg-mobile-search svg{width:19px;height:19px;fill:none;stroke:#8db7de;stroke-width:1.8;stroke-linecap:round}
.tecsa-center-mobile .tc-msg-mobile-search input{width:100%!important;min-width:0!important;height:46px!important;padding:0!important;border:0!important;outline:0!important;background:transparent!important;color:#f4f9ff!important;font:600 14px/1.2 inherit!important;box-shadow:none!important}
.tecsa-center-mobile .tc-msg-mobile-search input::placeholder{color:#839dbb!important}
.tecsa-center-mobile .tc-msg-mobile-list-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 4px 7px}
.tecsa-center-mobile .tc-msg-mobile-list-caption>strong{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:#b7cee5}
.tecsa-center-mobile .tc-msg-mobile-list-caption>span{display:inline-flex;align-items:center;gap:5px;color:#7fa8cf;font-size:11px}
.tecsa-center-mobile .tc-msg-mobile-list-caption b{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#e64162;color:#fff;font-size:10px}
.tecsa-center-mobile .tc-msg-sidebar-title{display:none!important}
.tecsa-center-mobile .tc-msg-conversations{padding:0 10px calc(12px + env(safe-area-inset-bottom));scrollbar-width:none;overscroll-behavior:contain}
.tecsa-center-mobile .tc-msg-conversations::-webkit-scrollbar{display:none}
.tecsa-center-mobile .tc-msg-conversation{
  position:relative;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:11px;
  min-height:72px;
  margin:0 0 7px;
  padding:10px 11px;
  border:1px solid rgba(109,185,248,.14);
  border-radius:17px;
  background:linear-gradient(145deg,rgba(17,54,94,.82),rgba(8,35,67,.8));
  box-shadow:0 8px 25px rgba(0,8,25,.1),inset 0 1px 0 rgba(255,255,255,.025);
  -webkit-tap-highlight-color:transparent;
}
.tecsa-center-mobile .tc-msg-conversation:active{transform:scale(.988);background:rgba(28,80,132,.78)}
.tecsa-center-mobile .tc-msg-conversation.is-active{background:linear-gradient(145deg,rgba(24,80,139,.9),rgba(10,49,91,.88));border-color:rgba(77,170,255,.38)}
.tecsa-center-mobile .tc-msg-conversation.is-unread{border-color:rgba(74,177,255,.32);background:linear-gradient(145deg,rgba(20,68,119,.92),rgba(8,42,79,.9))}
.tecsa-center-mobile .tc-msg-conversation-icon,
.tecsa-center-mobile .tc-msg-conversation-avatar{width:46px;height:46px;box-shadow:0 7px 18px rgba(0,0,0,.22)}
.tecsa-center-mobile .tc-msg-conversation-copy strong{font-size:14px;line-height:1.25}
.tecsa-center-mobile .tc-msg-conversation.is-unread .tc-msg-conversation-copy strong{font-weight:850}
.tecsa-center-mobile .tc-msg-conversation-copy em{margin-top:6px;color:#88a5c3;font-size:12px;line-height:1.2}
.tecsa-center-mobile .tc-msg-conversation-line time{font-size:10px;color:#718dab}
.tecsa-center-mobile .tc-msg-conversation>b{align-self:end;min-width:22px;height:22px;padding:0 5px;background:#e84365;font-size:10px}
.tecsa-center-mobile .tc-msg-conversation-chevron{align-self:center;padding-right:2px}
.tecsa-center-mobile .tc-msg-no-items{min-height:55dvh}

.tecsa-center-mobile .tc-msg-thread-head{
  position:relative;
  z-index:80;
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center!important;
  gap:9px!important;
  min-height:62px;
  padding:max(8px,env(safe-area-inset-top)) 10px 8px!important;
  border-bottom:1px solid var(--tc-msg-line)!important;
  background:rgba(5,22,43,.96)!important;
  backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  box-sizing:border-box;
}
.tecsa-center-mobile .tc-msg-mobile-thread-back{display:grid!important}
.tecsa-center-mobile .tc-msg-thread-identity{gap:9px;overflow:hidden}
.tecsa-center-mobile .tc-msg-thread-avatar,
.tecsa-center-mobile .tc-msg-thread-group-icon{width:38px;height:38px;flex:0 0 38px}
.tecsa-center-mobile .tc-msg-thread-title{min-width:0}
.tecsa-center-mobile .tc-msg-thread-title strong,
.tecsa-center-mobile .tc-msg-thread-title span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tecsa-center-mobile .tc-msg-thread-title strong{font-size:15px;line-height:1.15}
.tecsa-center-mobile .tc-msg-thread-title span{margin-top:4px;color:#87a5c4;font-size:10px}
.tecsa-center-mobile .tc-msg-thread-head-actions{width:auto!important;gap:5px!important;justify-content:flex-end!important}
.tecsa-center-mobile .tc-msg-participants-toggle,
.tecsa-center-mobile .tc-msg-thread-head-actions>[data-tc-add-members],
.tecsa-center-mobile .tc-msg-search-toggle,
.tecsa-center-mobile .tc-msg-chat-menu-button{
  position:relative;
  display:grid!important;
  place-items:center;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  border:1px solid rgba(112,190,255,.16)!important;
  border-radius:12px!important;
  background:rgba(18,57,98,.76)!important;
  color:#dcecff!important;
  font-size:0!important;
}
.tecsa-center-mobile .tc-msg-participants-toggle::before{content:"👥";font-size:17px}
.tecsa-center-mobile .tc-msg-thread-head-actions>[data-tc-add-members]::before{content:"＋";font-size:22px;font-weight:400}
.tecsa-center-mobile .tc-msg-search-toggle::before{content:"⌕";font-size:24px;line-height:1;transform:rotate(-18deg)}
.tecsa-center-mobile .tc-msg-chat-menu-button{font-size:24px!important;line-height:1!important}
.tecsa-center-mobile .tc-msg-participants-popover{
  position:fixed!important;
  top:auto!important;
  right:10px!important;
  bottom:calc(10px + env(safe-area-inset-bottom))!important;
  left:10px!important;
  width:auto!important;
  max-height:min(58dvh,520px)!important;
  padding:10px!important;
  border-radius:19px!important;
  background:#0a294d!important;
  z-index:100160!important;
}
.tecsa-center-mobile .tc-msg-participants-list{max-height:44dvh;overflow:auto;overscroll-behavior:contain}
.tecsa-center-mobile .tc-msg-search-panel{
  position:fixed!important;
  top:max(76px,calc(env(safe-area-inset-top) + 64px))!important;
  right:10px!important;
  left:10px!important;
  z-index:100160!important;
  width:auto!important;
  padding:12px!important;
  border-radius:17px!important;
  background:#0a294d!important;
  box-shadow:0 24px 70px rgba(0,0,0,.58)!important;
}
.tecsa-center-mobile .tc-msg-mobile-thread-loading{display:grid;place-items:center;align-content:center;gap:12px;height:100%;color:#a9c4df}
.tecsa-center-mobile .tc-msg-mobile-thread-loading span{width:34px;height:34px;border:3px solid rgba(88,175,255,.18);border-top-color:#4aa9ff;border-radius:50%;animation:tc-msg-spin .8s linear infinite}
@keyframes tc-msg-spin{to{transform:rotate(360deg)}}

.tecsa-center-mobile .tc-msg-messages{
  padding:14px 10px 18px!important;
  background:
    linear-gradient(rgba(5,24,47,.93),rgba(5,24,47,.93)),
    radial-gradient(circle at 20% 10%,rgba(51,145,232,.1),transparent 26%);
  scrollbar-width:none;
  overscroll-behavior:contain;
  scroll-behavior:auto;
}

.tc-msg-messages.is-opening-position{visibility:hidden!important}
.tc-msg-conversation-context-menu button.is-danger{color:#ffd4dc}
.tecsa-center-mobile .tc-msg-messages::-webkit-scrollbar{display:none}
.tecsa-center-mobile .tc-msg-bubble{
  max-width:calc(88% - 34px)!important;
  margin:0 0 10px 38px!important;
  padding:10px 36px 9px 11px!important;
  border:1px solid rgba(121,194,255,.14)!important;
  border-radius:17px 17px 17px 6px!important;
  background:linear-gradient(145deg,rgba(19,58,99,.95),rgba(11,41,76,.94))!important;
  box-shadow:0 8px 22px rgba(0,4,18,.16);
}
.tecsa-center-mobile .tc-msg-bubble.is-mine{
  margin-left:auto!important;
  margin-right:38px!important;
  border-color:rgba(93,185,255,.24)!important;
  border-radius:17px 17px 6px 17px!important;
  background:linear-gradient(145deg,#247fe5,#1764c7)!important;
}
.tecsa-center-mobile .tc-msg-bubble-avatar{left:-37px!important;right:auto!important;bottom:1px!important;width:30px!important;height:30px!important}
.tecsa-center-mobile .tc-msg-bubble.is-mine .tc-msg-bubble-avatar{right:-37px!important;left:auto!important}
.tecsa-center-mobile .tc-msg-bubble-meta{gap:8px;margin-bottom:5px;font-size:9px}
.tecsa-center-mobile .tc-msg-bubble-meta strong{max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tecsa-center-mobile .tc-msg-bubble-body{font-size:14px;line-height:1.43}
.tecsa-center-mobile .tc-msg-message-menu-toggle{top:6px!important;right:6px!important;width:28px!important;height:28px!important;border-radius:9px!important}
.tecsa-center-mobile .tc-msg-parent-quote{max-width:100%;padding:6px 8px}
.tecsa-center-mobile .tc-msg-attachments{width:100%;min-width:0}
.tecsa-center-mobile .tc-msg-attachment{min-width:0!important;width:100%;grid-template-columns:30px minmax(0,1fr) 24px;padding:8px}
.tecsa-center-mobile .tc-msg-image-attachment{max-width:100%}
.tecsa-center-mobile .tc-msg-reaction-users{display:none}
.tecsa-center-mobile .tc-msg-reaction{min-height:26px;padding:2px 7px}
.tecsa-center-mobile .tc-msg-inline-emoji{font-size:1.65em}

.tecsa-center-mobile .tc-msg-reply{
  position:relative;
  z-index:90;
  grid-template-columns:42px minmax(0,1fr) 44px!important;
  align-items:end!important;
  gap:6px!important;
  padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;
  border-top:1px solid var(--tc-msg-line)!important;
  background:rgba(4,18,37,.96)!important;
  backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
}
.tecsa-center-mobile .tc-msg-file-button,
.tecsa-center-mobile .tc-msg-reply button[type=submit]{width:42px!important;min-width:42px!important;height:44px!important;min-height:44px!important;align-self:end!important;border-radius:14px!important}
.tecsa-center-mobile .tc-msg-file-button{font-size:18px;background:rgba(18,58,101,.82)!important}
.tecsa-center-mobile .tc-msg-reply button[type=submit]{padding:0!important;background:linear-gradient(145deg,#3ba5ff,#176dd8)!important;box-shadow:0 7px 18px rgba(24,111,220,.25)}
.tecsa-center-mobile .tc-msg-reply button[type=submit]::after{content:"➤"!important;font-size:17px!important;transform:translateX(1px)}
.tecsa-center-mobile .tc-msg-reply-main>.tc-msg-emoji-wrap{min-height:44px}
.tecsa-center-mobile .tc-msg-reply-main>.tc-msg-emoji-wrap>textarea,
.tecsa-center-mobile .tc-msg-reply textarea{
  min-height:44px!important;
  max-height:124px!important;
  height:44px;
  padding:11px 45px 10px 12px!important;
  border:1px solid rgba(121,196,255,.2)!important;
  border-radius:15px!important;
  resize:none!important;
  background:rgba(15,50,89,.82)!important;
  color:#fff!important;
  font-size:14px!important;
  line-height:1.35!important;
  overflow-y:auto;
}
.tecsa-center-mobile .tc-msg-emoji-controls{right:5px!important;bottom:4px!important}
.tecsa-center-mobile .tc-msg-emoji-toggle{width:35px!important;height:35px!important;border-radius:11px!important;font-size:21px!important;background:transparent!important}
.tecsa-center-mobile .tc-msg-emoji-panel{position:fixed!important;right:8px!important;bottom:calc(68px + env(safe-area-inset-bottom))!important;left:8px!important;width:auto!important;grid-template-columns:repeat(5,1fr)!important;gap:5px!important;padding:9px!important;border-radius:18px!important;background:#0b2d55!important;z-index:100180!important}
.tecsa-center-mobile .tc-msg-emoji-panel button{width:100%!important;height:43px!important;font-size:27px!important}
.tecsa-center-mobile .tc-msg-selected-files{grid-column:1/-1;max-height:62px;overflow:auto}
.tecsa-center-mobile .tc-msg-reply-target{margin-bottom:5px;padding:6px 7px}
.tecsa-center-mobile .tc-msg-replies-disabled{padding:14px calc(12px + env(safe-area-inset-bottom))}

.tecsa-center-mobile .tc-msg-message-menu-panel,
.tecsa-center-mobile .tc-msg-message-menu-panel.is-context{
  position:fixed!important;
  top:auto!important;
  right:8px!important;
  bottom:calc(var(--tc-msg-composer-height,92px) + 12px + env(safe-area-inset-bottom))!important;
  left:8px!important;
  z-index:100190!important;
  width:auto!important;
  max-width:none!important;
  padding:9px!important;
  border-radius:19px!important;
  background:#0b2d55!important;
  box-shadow:0 28px 80px rgba(0,0,0,.65)!important;
  max-height:calc(var(--tc-msg-mobile-height,100dvh) - var(--tc-msg-composer-height,92px) - 110px)!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.tecsa-center-mobile .tc-msg-message-menu-panel>button{min-height:44px;border-radius:11px}
.tecsa-center-mobile .tc-msg-message-reaction-picker{grid-template-columns:repeat(8,1fr)!important}
.tecsa-center-mobile .tc-msg-conversation-context-menu{right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;left:8px!important;top:auto!important;width:auto!important;border-radius:18px!important}

.tecsa-center-mobile .tc-msg-modal,
.tecsa-center-mobile .tc-msg-members-modal,
.tecsa-center-mobile .tc-msg-search-results-modal,
.tecsa-center-mobile .tc-msg-image-modal{z-index:100200!important}
.tecsa-center-mobile .tc-msg-compose{
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  height:var(--tc-msg-mobile-height,100dvh)!important;
  max-height:none!important;
  margin:0!important;
  padding:max(8px,env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom))!important;
  border:0!important;
  border-radius:0!important;
  overflow-y:auto!important;
  background:linear-gradient(180deg,#082442,#061b34)!important;
  overscroll-behavior:contain;
}
.tecsa-center-mobile .tc-msg-compose-head{
  position:sticky;
  top:0;
  z-index:15;
  min-height:54px;
  margin:0 -10px 12px!important;
  padding:max(8px,env(safe-area-inset-top)) 12px 8px;
  border-bottom:1px solid var(--tc-msg-line);
  background:rgba(6,28,55,.97);
  backdrop-filter:blur(16px);
}
.tecsa-center-mobile .tc-msg-compose-head strong{font-size:18px}
.tecsa-center-mobile .tc-msg-compose-head button{display:grid;place-items:center;width:40px;height:40px;border:1px solid rgba(124,198,255,.18);border-radius:13px;background:rgba(20,61,103,.8);font-size:24px}
.tecsa-center-mobile .tc-msg-compose input:not([type=checkbox]):not([type=radio]),
.tecsa-center-mobile .tc-msg-compose textarea,
.tecsa-center-mobile .tc-msg-compose select{min-height:46px;border-radius:13px!important;background:#10365f!important}
.tecsa-center-mobile .tc-msg-compose input[type=checkbox],
.tecsa-center-mobile .tc-msg-members-dialog input[type=checkbox]{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;padding:0!important}
.tecsa-center-mobile .tc-msg-recipient-columns{grid-template-columns:1fr!important;gap:9px!important}
.tecsa-center-mobile .tc-msg-recipient-list{height:190px!important;max-height:190px!important;border-radius:13px!important;overscroll-behavior:contain}
.tecsa-center-mobile .tc-msg-recipient-item{min-height:46px}
.tecsa-center-mobile .tc-msg-recipient-toolbar{position:relative}
.tecsa-center-mobile .tc-msg-compose-actions{
  position:sticky;
  bottom:0;
  z-index:14;
  margin:14px -10px -10px!important;
  padding:10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid var(--tc-msg-line);
  background:rgba(5,24,48,.97);
  backdrop-filter:blur(16px);
}
.tecsa-center-mobile .tc-msg-compose-actions button{min-height:44px!important;border-radius:13px!important}
.tecsa-center-mobile .tc-msg-selection-popover{top:max(72px,calc(env(safe-area-inset-top) + 58px))!important;max-height:calc(var(--tc-msg-mobile-height,100dvh) - 90px)!important;border-radius:17px!important}

.tecsa-center-mobile .tc-msg-members-dialog{
  position:fixed!important;
  inset:auto 0 0 0!important;
  width:100%!important;
  max-height:min(86dvh,var(--tc-msg-mobile-height,100dvh))!important;
  margin:0!important;
  padding:14px 12px calc(14px + env(safe-area-inset-bottom))!important;
  border-radius:22px 22px 0 0!important;
  overflow:auto!important;
}
.tecsa-center-mobile .tc-msg-members-actions{position:sticky;bottom:0;margin:14px -12px -14px;padding:10px 12px calc(14px + env(safe-area-inset-bottom));background:#09264b;border-top:1px solid var(--tc-msg-line)}
.tecsa-center-mobile .tc-msg-members-actions button{width:100%;min-height:44px}
.tecsa-center-mobile .tc-msg-image-modal-dialog{inset:max(8px,env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))!important;border-radius:18px!important}
.tecsa-center-mobile .tc-msg-float{display:none!important}

@media(max-width:380px){
  .tecsa-center-mobile .tc-msg-thread-head{grid-template-columns:40px minmax(0,1fr) auto;gap:6px!important;padding-left:7px!important;padding-right:7px!important}
  .tecsa-center-mobile .tc-msg-thread-avatar,
  .tecsa-center-mobile .tc-msg-thread-group-icon{display:none}
  .tecsa-center-mobile .tc-msg-thread-head-actions{gap:3px!important}
  .tecsa-center-mobile .tc-msg-participants-toggle,
  .tecsa-center-mobile .tc-msg-thread-head-actions>[data-tc-add-members],
  .tecsa-center-mobile .tc-msg-search-toggle,
  .tecsa-center-mobile .tc-msg-chat-menu-button{width:35px!important;min-width:35px!important;height:35px!important;min-height:35px!important}
  .tecsa-center-mobile .tc-msg-bubble{max-width:calc(91% - 32px)!important}
  .tecsa-center-mobile .tc-msg-emoji-panel{grid-template-columns:repeat(4,1fr)!important}
}

@media(prefers-reduced-motion:reduce){
  .tecsa-center-mobile .tc-msg-sidebar,
  .tecsa-center-mobile .tc-msg-thread{transition:none!important}
}

/* 0.7.4 — mobile messages stability and interaction fixes. */
.tecsa-center-mobile .tecsa-messages-page{
  inset:0 0 auto 0!important;
  top:0!important;
  transform:none!important;
}
.tecsa-center-mobile .tc-msg-mobile-header{
  position:relative!important;
  top:0!important;
  z-index:120!important;
  width:100%!important;
  flex-shrink:0!important;
}
.tecsa-center-mobile .tc-msg-sidebar,
.tecsa-center-mobile .tc-msg-thread{
  top:0!important;
}
.tecsa-center-mobile .tc-msg-thread-identity>.tc-msg-avatar,
.tecsa-center-mobile .tc-msg-thread-identity>.tc-msg-thread-group-icon{
  display:grid!important;
  place-items:center!important;
  align-items:center!important;
  justify-items:center!important;
  line-height:1!important;
}
.tecsa-center-mobile .tc-msg-thread-identity>.tc-msg-avatar>b,
.tecsa-center-mobile .tc-msg-thread-identity>.tc-msg-thread-group-icon{
  position:static!important;
  inset:auto!important;
  margin:0!important;
  transform:none!important;
  line-height:1!important;
  text-align:center!important;
}
.tecsa-center-mobile .tc-msg-participants:not(.is-open) .tc-msg-participants-popover,
.tecsa-center-mobile .tc-msg-participants:not(.is-open):hover .tc-msg-participants-popover{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateY(8px)!important;
}
.tecsa-center-mobile .tc-msg-participants.is-open .tc-msg-participants-popover{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  transform:translateY(0)!important;
}
.tecsa-center-mobile .tc-msg-members-modal{
  width:100vw!important;
  max-width:100vw!important;
  overflow:hidden!important;
}
.tecsa-center-mobile .tc-msg-members-dialog{
  left:0!important;
  right:0!important;
  width:100vw!important;
  max-width:100vw!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}
.tecsa-center-mobile .tc-msg-members-head{
  min-width:0!important;
  width:100%!important;
}
.tecsa-center-mobile .tc-msg-members-head strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.tecsa-center-mobile .tc-msg-members-head button{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  margin:0!important;
}
.tecsa-center-mobile .tc-msg-members-dialog>label,
.tecsa-center-mobile .tc-msg-members-dialog input,
.tecsa-center-mobile .tc-msg-members-dialog select,
.tecsa-center-mobile .tc-msg-members-actions{
  max-width:100%!important;
  box-sizing:border-box!important;
}
.tecsa-center-mobile .tc-msg-members-dialog select{
  overflow-x:hidden!important;
}
.tecsa-center-mobile .tc-msg-reply.is-loading{
  opacity:.78!important;
}
.tecsa-center-mobile .tc-msg-reply.is-loading textarea{
  pointer-events:auto!important;
}


/* 0.7.5 — real Android viewport mount, visible home header and tap-driven participant sheet. */
html.tc-msg-mobile-root,
body.tc-msg-mobile-root{
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
body.tc-msg-mobile-root>.tecsa-messages-page{
  position:fixed!important;
  top:var(--tc-msg-viewport-top,0px)!important;
  right:0!important;
  bottom:auto!important;
  left:0!important;
  width:100vw!important;
  height:var(--tc-msg-mobile-height,100dvh)!important;
  margin:0!important;
  transform:none!important;
  contain:layout paint style;
}
.tecsa-center-mobile .tc-msg-sidebar>.tc-msg-mobile-header{
  display:grid!important;
  position:relative!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-height:64px!important;
  padding:10px 12px 8px!important;
  z-index:500!important;
}
.tecsa-center-mobile .tc-msg-sidebar{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.tecsa-center-mobile .tc-msg-mobile-list-tools{
  flex:0 0 auto!important;
}
.tecsa-center-mobile .tc-msg-conversations{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.tecsa-center-mobile .tc-msg-mobile-home{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.tecsa-center-mobile .tc-msg-participants-popover{
  display:none!important;
  position:fixed!important;
  top:auto!important;
  right:8px!important;
  bottom:calc(8px + env(safe-area-inset-bottom))!important;
  left:8px!important;
  width:auto!important;
  max-width:none!important;
  max-height:min(68dvh,560px)!important;
  overflow:hidden!important;
  z-index:2147483000!important;
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  pointer-events:auto!important;
  border-radius:20px!important;
  background:#0a2b52!important;
  box-shadow:0 28px 90px rgba(0,0,0,.72)!important;
}
.tecsa-center-mobile .tc-msg-participants.is-open .tc-msg-participants-popover{
  display:block!important;
}
.tecsa-center-mobile .tc-msg-participants-list{
  max-height:min(56dvh,470px)!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.tecsa-center-mobile .tc-msg-participants-toggle{
  pointer-events:auto!important;
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent!important;
}

/* 0.7.7 — Android top inset tune, voice playback stability and custom audio player. */
body.tc-msg-mobile-root>.tecsa-messages-page{
  top:var(--tc-msg-viewport-top,34px)!important;
  height:var(--tc-msg-mobile-height,calc(100dvh - 28px))!important;
}
.tecsa-center-mobile .tc-msg-sidebar>.tc-msg-mobile-header,
.tecsa-center-mobile .tc-msg-thread-head{
  min-height:68px!important;
  padding:10px 12px 9px!important;
}
.tecsa-center-mobile .tc-msg-search-panel,
.tecsa-center-mobile .tc-msg-participants-popover{
  position:fixed!important;
  top:calc(var(--tc-msg-viewport-top,34px) + 74px)!important;
  right:10px!important;
  bottom:auto!important;
  left:10px!important;
  width:auto!important;
  max-height:calc(var(--tc-msg-mobile-height,100dvh) - 92px)!important;
  margin:0!important;
  padding:12px!important;
  overflow:hidden!important;
  border:1px solid rgba(112,190,255,.2)!important;
  border-radius:18px!important;
  background:#0a294d!important;
  box-shadow:0 24px 70px rgba(0,0,0,.62)!important;
  z-index:2147483000!important;
}
.tecsa-center-mobile .tc-msg-participants-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:-2px -2px 8px;
  padding:0 0 9px;
  border-bottom:1px solid rgba(112,190,255,.14);
}
.tecsa-center-mobile .tc-msg-participants-sheet-head strong{font-size:16px;color:#fff}
.tecsa-center-mobile .tc-msg-participants-sheet-head button{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  padding:0!important;
  border:1px solid rgba(112,190,255,.18)!important;
  border-radius:12px!important;
  background:rgba(21,61,103,.9)!important;
  color:#fff!important;
  font-size:25px!important;
  line-height:1!important;
}
.tecsa-center-mobile .tc-msg-participants-list{
  max-height:calc(var(--tc-msg-mobile-height,100dvh) - 190px)!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}

.tecsa-center-mobile .tc-msg-reply{
  grid-template-columns:88px minmax(0,1fr) 44px!important;
}
.tecsa-center-mobile .tc-msg-reply-tools{
  display:flex!important;
  align-items:flex-end!important;
  gap:4px!important;
  min-width:0!important;
}
.tecsa-center-mobile .tc-msg-file-button,
.tecsa-center-mobile .tc-msg-voice-button{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  min-width:42px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  border:1px solid rgba(121,196,255,.18)!important;
  border-radius:14px!important;
  background:rgba(18,58,101,.82)!important;
  color:#fff!important;
  font-size:19px!important;
  line-height:1!important;
  touch-action:none!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}
.tecsa-center-mobile .tc-msg-voice-button.is-requesting{opacity:.7}
.tecsa-center-mobile .tc-msg-voice-button.is-recording{
  border-color:#ff7187!important;
  background:linear-gradient(145deg,#ed3f60,#bd1f42)!important;
  box-shadow:0 0 0 5px rgba(237,63,96,.16)!important;
  animation:tc-msg-recording-pulse 1.05s ease-in-out infinite!important;
}
@keyframes tc-msg-recording-pulse{50%{transform:scale(.94);box-shadow:0 0 0 10px rgba(237,63,96,.04)}}
.tecsa-center-mobile .tc-msg-voice-draft{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:6px 8px;
  margin-top:6px;
  padding:7px 8px;
  border:1px solid rgba(102,194,255,.2);
  border-radius:13px;
  background:rgba(8,38,72,.88);
}
.tecsa-center-mobile .tc-msg-voice-draft[hidden]{display:none!important}
.tecsa-center-mobile .tc-msg-voice-draft audio{grid-column:1/-1;width:100%;height:36px}
.tecsa-center-mobile .tc-msg-voice-draft span{min-width:0;color:#a9c8e8;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tecsa-center-mobile .tc-msg-voice-draft button{
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  padding:0!important;
  border-radius:9px!important;
  background:rgba(225,64,92,.18)!important;
  color:#ff8ba0!important;
  font-size:20px!important;
}
.tecsa-center-mobile .tc-msg-audio-attachment,
.tc-msg-audio-attachment{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  padding:10px;
  border:1px solid rgba(121,196,255,.18);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(16,58,102,.92),rgba(9,37,70,.94));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.tc-msg-audio-play{
  display:grid;
  place-items:center;
  width:46px;
  min-width:46px;
  height:46px;
  padding:0;
  border:1px solid rgba(121,196,255,.22);
  border-radius:50%;
  background:linear-gradient(145deg,#3ca7ff,#176bd9);
  color:#fff;
  box-shadow:0 10px 22px rgba(14,77,154,.28);
}
.tc-msg-audio-play span{display:block;font-size:18px;line-height:1;transform:translateX(1px)}
.tc-msg-audio-attachment.is-playing .tc-msg-audio-play{background:linear-gradient(145deg,#2fb07a,#14895b)}
.tc-msg-audio-attachment.is-error .tc-msg-audio-play{background:linear-gradient(145deg,#e85a75,#bd2848)}
.tc-msg-audio-main{display:grid;gap:7px;min-width:0}
.tc-msg-audio-top,.tc-msg-audio-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.tc-msg-audio-top strong,.tc-msg-audio-bottom span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-audio-top strong{font-size:14px;color:#fff}
.tc-msg-audio-top small,.tc-msg-audio-bottom span{color:#99b8d8;font-size:11px}
.tc-msg-audio-progress{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:999px;background:linear-gradient(90deg,rgba(112,190,255,.35),rgba(255,255,255,.14));outline:none}
.tc-msg-audio-progress::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border:0;border-radius:50%;background:#fff;box-shadow:0 0 0 3px rgba(58,167,255,.22)}
.tc-msg-audio-progress::-moz-range-thumb{width:14px;height:14px;border:0;border-radius:50%;background:#fff;box-shadow:0 0 0 3px rgba(58,167,255,.22)}
.tc-msg-audio-open{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:64px!important;
  padding:5px 9px!important;
  border:1px solid rgba(121,196,255,.18)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.05)!important;
  color:#dff1ff!important;
  font-size:11px!important;
  line-height:1.1!important;
  text-align:center!important;
}
.tecsa-center-mobile .tc-msg-attachment{appearance:none;-webkit-appearance:none;text-align:left}

.tecsa-center-mobile .tc-msg-image-modal-stage{
  min-height:0!important;
  overflow:hidden!important;
}
.tecsa-center-mobile .tc-msg-image-modal-stage>img,
.tecsa-center-mobile .tc-msg-image-modal-stage>video,
.tecsa-center-mobile .tc-msg-image-modal-stage>iframe{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  border:0!important;
  object-fit:contain!important;
  background:#020912!important;
}
.tecsa-center-mobile .tc-msg-image-modal-stage>audio{
  width:calc(100% - 24px)!important;
  margin:auto!important;
}
.tecsa-center-mobile .tc-msg-attachment-no-preview{
  display:grid;
  place-items:center;
  align-content:center;
  gap:12px;
  min-height:220px;
  padding:24px;
  color:#a9c8e8;
  text-align:center;
}
.tecsa-center-mobile .tc-msg-attachment-no-preview[hidden]{display:none!important}
.tecsa-center-mobile .tc-msg-attachment-no-preview span{font-size:48px}
.tecsa-center-mobile .tc-msg-image-modal-footer{gap:10px}
.tecsa-center-mobile .tc-msg-image-download{white-space:nowrap}

@media(max-width:380px){
  .tecsa-center-mobile .tc-msg-reply{grid-template-columns:80px minmax(0,1fr) 42px!important;gap:4px!important}
  .tecsa-center-mobile .tc-msg-file-button,
  .tecsa-center-mobile .tc-msg-voice-button{width:38px!important;min-width:38px!important}
}
.tc-msg-reply-tools{display:flex;align-items:stretch;gap:6px}
.tc-msg-voice-button{display:grid;place-items:center;align-self:stretch;width:48px;min-width:48px;min-height:52px;padding:0;border:1px solid rgba(121,196,255,.25);border-radius:12px;background:rgba(255,255,255,.07);color:#9bdcff;font-size:20px;cursor:pointer;touch-action:none}

/* 0.7.8 — M4A upload support and authenticated blob playback. */
.tc-msg-audio-attachment.is-loading .tc-msg-audio-play{opacity:.75;pointer-events:none}
.tc-msg-audio-attachment.is-loading .tc-msg-audio-play span{font-size:0;width:18px;height:18px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:tc-msg-spin .75s linear infinite}
.tc-msg-audio-attachment.is-error .tc-msg-audio-progress{opacity:.45}

/* 0.8.4 — reliable downloads, inline video playback and FFmpeg poster previews. */
.tc-msg-download-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:34px!important;
  padding:0 12px!important;
  border:1px solid rgba(121,196,255,.24)!important;
  border-radius:999px!important;
  background:linear-gradient(145deg,#319cff,#1d71d8)!important;
  color:#fff!important;
  text-decoration:none!important;
  font-size:11px!important;
  font-weight:800!important;
  white-space:nowrap!important;
  box-shadow:0 8px 20px rgba(12,82,168,.2)!important;
}
.tc-msg-download-link.is-compact{min-height:28px!important;padding:0 10px!important;font-size:10px!important}
.tc-msg-download-link:hover{filter:brightness(1.08)}
.tc-msg-video-attachment{
  display:grid;
  gap:0;
  width:min(560px,100%);
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(121,196,255,.2);
  border-radius:16px;
  background:#05172e;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.tc-msg-video-attachment video{
  display:block;
  width:100%;
  max-height:420px;
  aspect-ratio:16/9;
  object-fit:contain;
  background:#020912;
}
.tc-msg-video-caption{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  padding:9px 10px;
  border-top:1px solid rgba(121,196,255,.13);
  background:rgba(10,40,76,.92);
}
.tc-msg-video-caption>span{min-width:0}
.tc-msg-video-caption strong,.tc-msg-video-caption small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-video-caption strong{color:#fff;font-size:12px}
.tc-msg-video-caption small{margin-top:2px;color:#91afcc;font-size:10px}
.tc-msg-attachment-download{font-size:18px;font-weight:900;color:#78d7ff}
.tc-msg-image-download{gap:7px}
.tc-msg-image-download::before{content:"↓";font-size:16px;font-weight:900}
@media(max-width:700px){
  .tecsa-center-mobile .tc-msg-video-attachment{width:100%;border-radius:14px}
  .tecsa-center-mobile .tc-msg-video-attachment video{max-height:58dvh;aspect-ratio:16/9}
  .tecsa-center-mobile .tc-msg-video-caption{padding:8px}
  .tecsa-center-mobile .tc-msg-download-link{min-height:32px!important;padding:0 10px!important}
}

/* 0.8.5 — mobile media safe areas, compact upload progress and message deletion. */
.tc-msg-video-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.tc-msg-video-expand{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid rgba(121,196,255,.24);border-radius:999px;background:rgba(255,255,255,.07);color:#fff;font-size:17px;font-weight:800;line-height:1;cursor:pointer}
.tc-msg-video-expand:hover{background:rgba(49,156,255,.28)}
.tc-msg-message-menu-panel .is-danger{color:#ffb4c1!important;border-color:rgba(255,91,118,.28)!important;background:rgba(163,28,54,.18)!important}
.tc-msg-selected-files .tc-msg-upload-percent{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800;color:#d9eeff}
.tc-msg-selected-files>i{display:block;width:100%;height:4px;margin-top:5px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.12)}
.tc-msg-selected-files>i::after{content:"";display:block;width:var(--tc-upload-progress,0%);height:100%;border-radius:inherit;background:linear-gradient(90deg,#32a7ff,#68d6ff);transition:width .12s linear}

@media(max-width:700px){
  .tecsa-center-mobile .tc-msg-image-modal{
    box-sizing:border-box!important;
    display:block!important;
    padding:calc(var(--tc-msg-viewport-top,34px) + 8px) 8px calc(env(safe-area-inset-bottom,0px) + 54px)!important;
  }
  .tecsa-center-mobile .tc-msg-image-modal[hidden]{display:none!important}
  .tecsa-center-mobile .tc-msg-image-modal-dialog{
    display:grid!important;
    grid-template-rows:minmax(0,1fr) auto!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    border-radius:16px!important;
  }
  .tecsa-center-mobile .tc-msg-image-modal-stage{
    min-width:0!important;
    min-height:0!important;
    padding:8px!important;
    overflow:hidden!important;
  }
  .tecsa-center-mobile .tc-msg-image-modal-stage>img,
  .tecsa-center-mobile .tc-msg-image-modal-stage>video,
  .tecsa-center-mobile .tc-msg-image-modal-stage>iframe{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    object-fit:contain!important;
  }
  .tecsa-center-mobile .tc-msg-image-modal-footer{
    position:relative!important;
    z-index:4!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    min-height:58px!important;
    padding:9px 10px!important;
    padding-bottom:max(9px,env(safe-area-inset-bottom,0px))!important;
  }
  .tecsa-center-mobile .tc-msg-image-modal-footer>div{min-width:0!important;flex:1 1 auto!important}
  .tecsa-center-mobile .tc-msg-image-download{width:auto!important;min-width:108px!important;min-height:40px!important;flex:0 0 auto!important}
  .tecsa-center-mobile .tc-msg-image-modal-close{right:10px!important;top:10px!important}
  .tecsa-center-mobile .tc-msg-video-caption{align-items:center!important}
  .tecsa-center-mobile .tc-msg-video-caption>span{flex:1 1 auto!important}
}


/* 0.8.6 — same-element video fullscreen, cancellable uploads and stable downloads. */
body.tc-msg-video-fullscreen-open{overflow:hidden!important;overscroll-behavior:none!important}
.tc-msg-video-fullscreen{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  display:grid!important;
  place-items:stretch!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#000!important;
}
.tc-msg-video-fullscreen[hidden]{display:none!important}
.tc-msg-video-fullscreen-stage{
  display:grid!important;
  place-items:center!important;
  min-width:0!important;
  min-height:0!important;
  width:100%!important;
  height:100%!important;
  padding:0 0 max(10px,env(safe-area-inset-bottom,0px))!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:#000!important;
}
.tc-msg-video-fullscreen-player{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  object-fit:contain!important;
  background:#000!important;
}
.tc-msg-video-fullscreen-close{
  position:fixed!important;
  top:max(10px,env(safe-area-inset-top,0px))!important;
  right:10px!important;
  z-index:2147483002!important;
  display:grid!important;
  place-items:center!important;
  width:48px!important;
  height:48px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:999px!important;
  background:rgba(3,13,27,.78)!important;
  color:#fff!important;
  box-shadow:0 10px 30px rgba(0,0,0,.42)!important;
  font-size:34px!important;
  font-weight:300!important;
  line-height:1!important;
  cursor:pointer!important;
  touch-action:manipulation!important;
}
.tc-msg-selected-files.is-uploading{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 30px!important;
  align-items:center!important;
  gap:5px 8px!important;
  width:100%!important;
  max-height:none!important;
  overflow:visible!important;
}
.tc-msg-selected-files.is-uploading .tc-msg-upload-percent{min-width:0!important;padding:0!important;background:transparent!important}
.tc-msg-selected-files.is-uploading>i{grid-column:1/-1!important;margin-top:0!important}
.tc-msg-upload-cancel{
  display:grid!important;
  place-items:center!important;
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0!important;
  border:1px solid rgba(255,126,147,.42)!important;
  border-radius:999px!important;
  background:rgba(146,24,48,.5)!important;
  color:#fff!important;
  font-size:23px!important;
  line-height:1!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
}
.tc-msg-reply.is-loading .tc-msg-selected-files,
.tc-msg-reply.is-loading .tc-msg-upload-cancel{pointer-events:auto!important}
.tc-msg-download-link.is-downloading,.tc-msg-image-download.is-downloading{opacity:.72!important;pointer-events:none!important}

/* 0.8.8 — native WebView video fullscreen keeps the video itself as the fullscreen element. */
.tc-msg-video-attachment video:fullscreen,
.tc-msg-image-modal-stage>video:fullscreen,
.tc-msg-video-attachment video:-webkit-full-screen,
.tc-msg-image-modal-stage>video:-webkit-full-screen{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  object-fit:contain!important;
  background:#000!important;
}


/* 0.8.9 — desktop message menus stay inside the visible viewport. */
.tc-msg-message-menu-panel.is-context{z-index:2147482000!important;max-height:calc(100vh - 16px);overflow:auto;overscroll-behavior:contain}


/* 0.9.0 — mobile participant picker keeps a dedicated right-side scroll lane. */
.tecsa-center-mobile .tc-msg-members-dialog{
  padding-right:8px!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
.tecsa-center-mobile .tc-msg-members-list-field{
  width:calc(100% - 28px)!important;
  max-width:calc(100% - 28px)!important;
  margin-right:28px!important;
}
.tecsa-center-mobile .tc-msg-members-list-field select{
  width:100%!important;
  max-width:100%!important;
  touch-action:manipulation!important;
}
.tecsa-center-mobile .tc-msg-members-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:4!important;
  margin:14px -2px -10px!important;
  padding:10px 4px calc(8px + env(safe-area-inset-bottom))!important;
  background:linear-gradient(180deg,rgba(9,38,75,.15),#09264b 28%)!important;
}

/* 0.9.1 — new-chat recipient fields leave a right-side lane for scrolling the whole dialog. */
@media (max-width:820px), (hover:none) and (pointer:coarse) {
  .tecsa-center-mobile .tc-msg-compose .tc-msg-recipient-columns {
    width:calc(100% - 30px)!important;
    max-width:calc(100% - 30px)!important;
    margin-right:30px!important;
  }
}


/* 0.9.9 — read receipts for direct and group conversations. */
.tc-msg-read-receipt{display:flex;align-items:center;justify-content:flex-end;gap:5px;max-width:100%;margin-top:7px;color:rgba(224,239,255,.62);font-size:10px;line-height:1.2}
.tc-msg-read-receipt>span:not(.tc-msg-read-avatars){color:#8fbce0;font-weight:900;letter-spacing:-2px}
.tc-msg-read-receipt.is-read>span:not(.tc-msg-read-avatars){color:#8ee8ff}
.tc-msg-read-receipt em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal}
.tc-msg-read-avatars{display:inline-flex;align-items:center;padding-left:3px}
.tc-msg-read-avatar{display:grid;place-items:center;width:19px;height:19px;margin-left:-5px;overflow:hidden;border:2px solid rgba(26,105,202,.95);border-radius:50%;background:#174f8c;color:#fff}
.tc-msg-read-avatar:first-child{margin-left:0}
.tc-msg-read-avatar img{width:100%;height:100%;object-fit:cover}
.tc-msg-read-avatar b{font-size:6px;line-height:1}
.tc-msg-bubble:not(.is-mine) .tc-msg-read-receipt{display:none}
.tecsa-center-mobile .tc-msg-read-receipt{margin-top:6px;font-size:9px}
.tecsa-center-mobile .tc-msg-read-avatar{width:18px;height:18px}

.tc-msg-thread-title [data-tc-thread-subtitle].is-live-activity{color:#2d7df6;font-weight:700;}

/* 0.9.34 — Telegram-like mobile composer, voice draft player, attachment library and centered viewer. */
.tc-msg-reply{
  display:block!important;
  padding:8px!important;
}
.tc-msg-composer-bar{
  display:flex;
  align-items:flex-end;
  gap:7px;
  width:100%;
  min-width:0;
}
.tc-msg-reply-main{
  position:relative;
  flex:1 1 auto;
  min-width:0;
}
.tc-msg-reply-main>.tc-msg-emoji-wrap{
  position:relative;
  min-width:0;
  min-height:44px;
}
.tc-msg-reply-main textarea,
.tc-msg-reply-main>.tc-msg-emoji-wrap>textarea{
  display:block;
  width:100%!important;
  min-height:44px!important;
  max-height:calc(1.42em * 6 + 22px)!important;
  margin:0!important;
  padding:10px 43px 10px 43px!important;
  resize:none!important;
  overflow-y:hidden;
  border-radius:22px!important;
  box-sizing:border-box!important;
  transition:height .16s ease, border-color .16s ease, background-color .16s ease!important;
}
.tc-msg-reply-main .tc-msg-emoji-controls{
  position:absolute!important;
  left:5px!important;
  right:auto!important;
  bottom:4px!important;
  z-index:5!important;
}
.tc-msg-reply-main .tc-msg-emoji-toggle{
  width:36px!important;
  height:36px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:transparent!important;
}
.tc-msg-reply-main .tc-msg-file-button{
  position:absolute!important;
  right:5px!important;
  bottom:4px!important;
  z-index:6!important;
  display:grid!important;
  place-items:center!important;
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:transparent!important;
  color:#9cc7ee!important;
}
.tc-msg-file-button svg,
.tc-msg-voice-button svg,
.tc-msg-send-button svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.tc-msg-send-button svg{fill:currentColor;stroke:none}
.tc-msg-composer-bar .tc-msg-voice-button,
.tc-msg-composer-bar .tc-msg-send-button{
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  color:#fff!important;
  background:linear-gradient(145deg,#36a8ff,#1874dc)!important;
  box-shadow:0 7px 20px rgba(24,111,220,.3)!important;
  cursor:pointer;
  touch-action:none;
}
.tc-msg-composer-bar .tc-msg-voice-button[hidden],
.tc-msg-composer-bar .tc-msg-send-button[hidden]{display:none!important}
.tc-msg-composer-bar .tc-msg-send-button::after{content:none!important;display:none!important}
.tc-msg-reply-target,
.tc-msg-selected-files,
.tc-msg-voice-draft{
  width:100%;
  box-sizing:border-box;
  margin:0 0 7px!important;
}
.tc-msg-selected-files[hidden],
.tc-msg-voice-draft[hidden]{display:none!important}

.tc-msg-voice-draft{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 36px;
  align-items:center;
  gap:8px;
  padding:8px 9px!important;
  border:1px solid rgba(117,194,255,.24)!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,rgba(17,57,100,.97),rgba(8,37,71,.97))!important;
  box-shadow:0 8px 25px rgba(0,8,25,.25)!important;
}
.tc-msg-voice-preview{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-width:0;
}
.tc-msg-voice-preview[hidden],
.tc-msg-voice-recording-state[hidden]{display:none!important}
.tc-msg-voice-preview-play{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:linear-gradient(145deg,#3aa9ff,#1873d9)!important;
  color:#fff!important;
  font-size:17px!important;
  box-shadow:0 6px 18px rgba(24,111,220,.3)!important;
}
.tc-msg-voice-preview-main{display:grid;gap:4px;min-width:0}
.tc-msg-voice-preview-main input[type=range]{
  width:100%;
  height:4px;
  margin:0;
  accent-color:#58b8ff;
  cursor:pointer;
}
.tc-msg-voice-preview-main>div{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.tc-msg-voice-preview-main span{flex:0 0 auto;color:#c9e4ff;font-size:11px;font-weight:700}
.tc-msg-voice-preview-main small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#85a9cd;font-size:10px;text-align:right}
.tc-msg-voice-cancel{
  display:grid!important;
  place-items:center!important;
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  border:1px solid rgba(255,120,145,.32)!important;
  border-radius:50%!important;
  background:rgba(114,28,52,.38)!important;
  color:#ff9db0!important;
  font-size:23px!important;
  line-height:1!important;
}
.tc-msg-voice-recording-state{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  color:#ffd9df;
}
.tc-msg-voice-recording-state>span{
  width:12px;
  height:12px;
  flex:0 0 12px;
  border-radius:50%;
  background:#ff5475;
  box-shadow:0 0 0 0 rgba(255,84,117,.5);
  animation:tc-msg-recording-pulse 1.1s infinite;
}
.tc-msg-voice-recording-state strong{font-size:12px}
@keyframes tc-msg-recording-pulse{70%{box-shadow:0 0 0 9px rgba(255,84,117,0)}100%{box-shadow:0 0 0 0 rgba(255,84,117,0)}}

.tc-msg-search-shortcuts{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  padding-top:3px;
}
.tc-msg-search-shortcuts button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:0 10px;
  border:1px solid rgba(113,193,255,.22);
  border-radius:11px;
  background:rgba(31,105,178,.26);
  color:#eaf6ff;
  font-weight:750;
  cursor:pointer;
}
.tc-msg-search-shortcuts button span{font-size:17px}

body.tc-msg-library-open{overflow:hidden!important}
.tc-msg-library-modal[hidden]{display:none!important}
.tc-msg-library-modal{
  position:fixed;
  inset:0;
  z-index:100220;
  display:grid;
  place-items:center;
  padding:14px;
  box-sizing:border-box;
}
.tc-msg-library-backdrop{position:absolute;inset:0;background:rgba(0,8,23,.82);backdrop-filter:blur(8px)}
.tc-msg-library-dialog{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  width:min(1040px,calc(100vw - 28px));
  height:min(760px,calc(100dvh - 28px));
  min-height:360px;
  overflow:hidden;
  border:1px solid rgba(115,193,255,.25);
  border-radius:20px;
  background:#071d39;
  box-shadow:0 30px 100px rgba(0,0,0,.62);
}
.tc-msg-library-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px;
  border-bottom:1px solid rgba(112,190,255,.15);
  background:#0b2b51;
}
.tc-msg-library-head strong,.tc-msg-library-head small{display:block}
.tc-msg-library-head strong{color:#fff;font-size:16px}
.tc-msg-library-head small{margin-top:3px;color:#86a9cc;font-size:10px}
.tc-msg-library-head>button{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:11px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:24px;
}
.tc-msg-library-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:10px 12px 0}
.tc-msg-library-tabs button{
  min-height:38px;
  border:1px solid rgba(112,190,255,.18);
  border-radius:11px;
  background:rgba(255,255,255,.045);
  color:#9dbbdd;
  font-weight:800;
}
.tc-msg-library-tabs button.is-active{border-color:rgba(74,183,255,.58);background:rgba(35,135,242,.25);color:#fff}
.tc-msg-library-filter{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  padding:10px 12px;
}
.tc-msg-library-filter input[type=search]{
  width:100%;
  min-height:40px;
  padding:0 12px;
  border:1px solid rgba(112,190,255,.2);
  border-radius:12px;
  background:rgba(255,255,255,.055);
  color:#fff;
  box-sizing:border-box;
}
.tc-msg-library-filter label{display:flex;align-items:center;gap:6px;color:#b8d2ec;font-size:11px;white-space:nowrap}
.tc-msg-library-filter button{min-height:40px;padding:0 15px;border:0;border-radius:12px;background:#2387f2;color:#fff;font-weight:800}
.tc-msg-library-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  min-height:0;
  overflow:auto;
  padding:0 12px 14px;
  align-content:start;
  -webkit-overflow-scrolling:touch;
}
.tc-msg-library-grid.is-files{grid-template-columns:repeat(2,minmax(0,1fr))}
.tc-msg-library-card{
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(112,190,255,.16);
  border-radius:15px;
  background:linear-gradient(145deg,rgba(15,49,86,.95),rgba(8,34,64,.95));
}
.tc-msg-library-card.is-file{
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:10px;
}
.tc-msg-library-preview{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1/1;
  padding:0;
  overflow:hidden;
  border:0;
  background:#020912;
  cursor:pointer;
}
.tc-msg-library-preview img{display:block;width:100%;height:100%;object-fit:cover}
.tc-msg-library-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:rgba(4,21,43,.72);color:#fff;font-size:18px}
.tc-msg-library-media-placeholder{display:grid;place-items:center;width:100%;height:100%;color:#7ec8ff;font-size:34px}
.tc-msg-library-file-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:rgba(35,135,242,.22);color:#bfe3ff;font-size:12px;font-weight:900}
.tc-msg-library-card-copy{display:block;min-width:0;padding:9px 10px 5px}
.tc-msg-library-card.is-file .tc-msg-library-card-copy{padding:0}
.tc-msg-library-card-copy strong,.tc-msg-library-card-copy small,.tc-msg-library-card-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-msg-library-card-copy strong{color:#fff;font-size:12px}
.tc-msg-library-card-copy small{margin-top:4px;color:#82a7cc;font-size:9px}
.tc-msg-library-card-copy span{margin-top:3px;color:#aac7e2;font-size:9px}
.tc-msg-library-actions{display:flex;align-items:center;gap:6px;padding:5px 9px 9px}
.tc-msg-library-card.is-file .tc-msg-library-actions{grid-column:1/-1;padding:4px 0 0}
.tc-msg-library-jump,.tc-msg-library-actions .tc-msg-download-link{
  flex:1 1 50%;
  min-width:0!important;
  min-height:32px!important;
  padding:0 7px!important;
  border:1px solid rgba(112,190,255,.2)!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.045)!important;
  color:#dff1ff!important;
  font-size:9px!important;
  font-weight:800!important;
  text-decoration:none!important;
  white-space:nowrap;
}
.tc-msg-library-loading,.tc-msg-library-empty{grid-column:1/-1;display:grid;place-items:center;align-content:center;gap:10px;min-height:220px;color:#91b0ce;text-align:center}
.tc-msg-library-loading span{width:28px;height:28px;border:3px solid rgba(124,199,255,.2);border-top-color:#55bdff;border-radius:50%;animation:tc-msg-spin .75s linear infinite}

/* Keep the attachment viewer centered even inside Android WebView layouts. */
.tc-msg-image-modal{
  left:0!important;
  right:0!important;
  width:100vw!important;
  max-width:100vw!important;
  margin:0!important;
  transform:none!important;
  box-sizing:border-box!important;
  z-index:100240!important;
}
.tc-msg-image-modal-dialog{
  left:auto!important;
  right:auto!important;
  margin:0 auto!important;
  transform:none!important;
  box-sizing:border-box!important;
  max-width:calc(100vw - 16px)!important;
}
.tc-msg-image-modal-stage{min-width:0!important;box-sizing:border-box!important}
.tc-msg-image-modal-stage>img{
  position:static!important;
  left:auto!important;
  right:auto!important;
  display:block!important;
  margin:auto!important;
  transform:none!important;
  object-position:center center!important;
  box-sizing:border-box!important;
}
.tc-msg-mobile-search.is-loading::after{content:"";width:17px;height:17px;border:2px solid rgba(143,195,238,.25);border-top-color:#7ed1ff;border-radius:50%;animation:tc-msg-spin .75s linear infinite}
.tc-msg-mobile-search.is-loading svg{display:none}

@media(max-width:760px){
  .tecsa-center-mobile .tc-msg-reply{
    display:block!important;
    padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;
  }
  .tecsa-center-mobile .tc-msg-composer-bar{gap:6px!important}
  .tecsa-center-mobile .tc-msg-reply-main textarea,
  .tecsa-center-mobile .tc-msg-reply-main>.tc-msg-emoji-wrap>textarea{
    min-height:44px!important;
    max-height:calc(1.42em * 6 + 22px)!important;
    height:44px;
    padding:10px 42px 10px 42px!important;
    border-radius:22px!important;
    overflow-y:hidden!important;
  }
  .tecsa-center-mobile .tc-msg-reply-main textarea.is-scrollable{overflow-y:auto!important}
  .tecsa-center-mobile .tc-msg-reply-main .tc-msg-emoji-controls{left:4px!important;right:auto!important;bottom:4px!important}
  .tecsa-center-mobile .tc-msg-reply-main .tc-msg-file-button{right:4px!important;bottom:4px!important;background:transparent!important}
  .tecsa-center-mobile .tc-msg-composer-bar .tc-msg-voice-button,
  .tecsa-center-mobile .tc-msg-composer-bar .tc-msg-send-button{align-self:flex-end!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;border-radius:50%!important}
  .tecsa-center-mobile .tc-msg-composer-bar .tc-msg-send-button::after{content:none!important}
  .tecsa-center-mobile .tc-msg-voice-draft audio{display:none!important}
  .tc-msg-search-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tc-msg-library-modal{padding:max(7px,env(safe-area-inset-top)) 7px max(7px,env(safe-area-inset-bottom))}
  .tc-msg-library-dialog{width:100%;height:100%;max-height:none;border-radius:17px}
  .tc-msg-library-filter{grid-template-columns:minmax(0,1fr) auto;padding:9px}
  .tc-msg-library-filter label{grid-column:1/2}
  .tc-msg-library-filter button{grid-column:2/3;grid-row:1/3}
  .tc-msg-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 9px 12px}
  .tc-msg-library-grid.is-files{grid-template-columns:1fr}
  .tc-msg-library-card.is-file{grid-template-columns:48px minmax(0,1fr)}
  .tc-msg-library-file-icon{width:48px;height:48px}
  .tecsa-center-mobile .tc-msg-image-modal-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;margin:0 auto!important}
  .tecsa-center-mobile .tc-msg-image-modal-stage>img{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;margin:auto!important}
}


/* 0.9.35 — mobile Enter/newline, reaction overlay stacking, centered viewer and visible library close. */
@media(max-width:760px){
  /* Ordinary message dots stay below the fixed reaction/action sheet. */
  .tecsa-center-mobile .tc-msg-message-menu{z-index:2!important}
  .tecsa-center-mobile .tc-msg-message-menu .tc-msg-message-menu-toggle{position:relative!important;z-index:1!important}
  .tecsa-center-mobile .tc-msg-message-menu.is-open{z-index:100180!important}
  .tecsa-center-mobile .tc-msg-message-menu.is-open .tc-msg-message-menu-toggle{z-index:0!important}
  .tecsa-center-mobile .tc-msg-message-menu.is-open .tc-msg-message-menu-panel{z-index:100190!important}

  /* The viewer is tied to the visual viewport, not to the horizontally translated chat body. */
  .tc-msg-image-modal:not([hidden]){
    position:fixed!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:8px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    transform:none!important;
  }
  .tc-msg-image-modal-dialog{
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    grid-template-rows:minmax(0,1fr) auto!important;
    margin:0!important;
    overflow:hidden!important;
    transform:none!important;
    box-sizing:border-box!important;
  }
  .tc-msg-image-modal-stage{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  .tc-msg-image-modal-stage>img{
    position:static!important;
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:100%!important;
    max-height:100%!important;
    margin:auto!important;
    object-fit:contain!important;
    object-position:center center!important;
    transform:none!important;
  }

  /* A permanently visible close control for Media / Files. */
  .tc-msg-library-dialog{position:relative!important}
  .tc-msg-library-head{min-height:58px!important;padding-right:62px!important;box-sizing:border-box!important}
  .tc-msg-library-close{
    position:absolute!important;
    top:10px!important;
    right:10px!important;
    z-index:40!important;
    display:grid!important;
    place-items:center!important;
    width:40px!important;
    height:40px!important;
    padding:0!important;
    border:1px solid rgba(255,255,255,.2)!important;
    border-radius:50%!important;
    background:#123d69!important;
    color:#fff!important;
    box-shadow:0 8px 24px rgba(0,0,0,.32)!important;
    font-size:29px!important;
    font-weight:400!important;
    line-height:1!important;
  }
}


/* 0.9.59 — Messages is an internal Core module on desktop. The Core shell owns
   the left menu and standard header; the chat fills only the remaining pane. */
@media (min-width:761px){
  .tc-app-shell-messages .tc-app-main{
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  .tc-app-shell-messages .tc-app-content{
    flex:1 1 0!important;
    height:0!important;
    min-height:0!important;
    padding:0 8px 8px!important;
    overflow:hidden!important;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages{
    position:relative!important;
    inset:auto!important;
    z-index:1!important;
    width:100%!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages>.tc-msg-toolbar{
    min-height:48px;
    margin:0 0 6px;
    padding:4px 0 0;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages>.tc-msg-layout{
    min-height:0!important;
  }
}


/* 0.9.60 — keep the chat below the restored standard Core header. */
@media (min-width:761px){
  .tc-app-shell-messages .tc-app-main{display:flex!important;flex-direction:column!important}
  .tc-app-shell-messages .tc-app-header.tc-app-header-standard{flex:0 0 104px!important}
  .tc-app-shell-messages .tc-app-content{position:relative!important;inset:auto!important;flex:1 1 0!important;height:0!important;min-height:0!important;padding:12px 8px 8px!important;overflow:hidden!important}
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages{position:relative!important;inset:auto!important;height:100%!important;min-height:0!important}
}


/* 0.9.61 — desktop Messages geometry inside the Core shell.
   The chat must fill the pane below the standard header and must keep a safe
   right gutter for outgoing avatars and the voice/send control. */
@media (min-width:761px){
  .tc-app-shell-messages .tc-app-main{
    height:100vh!important;
    min-height:0!important;
  }
  .tc-app-shell-messages .tc-app-content{
    display:flex!important;
    flex:1 1 0!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:100%!important;
    height:0!important;
    min-width:0!important;
    min-height:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages{
    position:relative!important;
    inset:auto!important;
    display:flex!important;
    flex:1 1 0!important;
    flex-direction:column!important;
    align-self:stretch!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages>.tc-msg-toolbar{
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages>.tc-msg-layout{
    display:grid!important;
    flex:1 1 0!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    box-sizing:border-box!important;
  }
  .tc-app-shell-messages .tc-msg-sidebar,
  .tc-app-shell-messages .tc-msg-thread{
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    box-sizing:border-box!important;
  }
  .tc-app-shell-messages .tc-msg-thread{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  .tc-app-shell-messages .tc-msg-messages{
    width:100%!important;
    max-width:100%!important;
    padding-right:72px!important;
    box-sizing:border-box!important;
  }
  .tc-app-shell-messages .tc-msg-bubble.is-mine{
    margin-right:48px!important;
  }
  .tc-app-shell-messages .tc-msg-bubble.is-mine .tc-msg-bubble-avatar{
    right:-42px!important;
  }
  .tc-app-shell-messages .tc-msg-reply{
    width:100%!important;
    max-width:100%!important;
    padding:8px 14px 8px 8px!important;
    box-sizing:border-box!important;
  }
  .tc-app-shell-messages .tc-msg-composer-bar{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
}


/* 0.9.62 — visible desktop right gutter inside the Bitrix24 frame.
   Previous rules only repeated the old 48px outgoing-message margin, so the
   avatar and microphone still remained at the extreme right edge. The B24
   desktop frame now reserves a real outer gutter, while the message stream
   and composer use a centered readable width. */
@media (min-width:761px){
  body.tc-b24-app-frame .tc-app-shell-messages .tc-app-content{
    padding:12px 64px 10px 8px!important;
  }
  .tc-app-shell-messages .tecsa-messages-page.is-core-app-shell-messages>.tc-msg-layout{
    flex:1 1 0!important;
    height:0!important;
    min-height:0!important;
  }
  .tc-app-shell-messages .tc-msg-messages{
    padding-left:clamp(24px,4vw,64px)!important;
    padding-right:clamp(84px,7vw,128px)!important;
  }
  .tc-app-shell-messages .tc-msg-reply{
    padding:8px 0!important;
  }
  .tc-app-shell-messages .tc-msg-composer-bar,
  .tc-app-shell-messages .tc-msg-reply-target,
  .tc-app-shell-messages .tc-msg-selected-files,
  .tc-app-shell-messages .tc-msg-voice-draft{
    width:min(980px,calc(100% - 40px))!important;
    max-width:calc(100% - 40px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
}


/* 0.9.63 — desktop new-message dialog belongs to the Core work pane.
   A fixed dialog used to be centered against the whole browser viewport, so
   with the Core sidebar it moved left and its upper controls hid underneath
   the standard module header. Keep the header visible, center the dialog in
   the actual module area, and contain its own vertical scroll. */
@media (min-width:761px){
  .tc-app-shell-messages .tc-msg-modal{
    top:116px!important;
    right:0!important;
    bottom:0!important;
    left:var(--tc-shell-side)!important;
    width:auto!important;
    height:auto!important;
    padding:12px 18px 16px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.tc-b24-app-frame .tc-app-shell-messages .tc-msg-modal{
    right:64px!important;
  }
  .tc-app-shell-messages .tc-msg-modal:not([hidden]){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .tc-app-shell-messages .tc-msg-modal-backdrop{
    position:absolute!important;
    inset:0!important;
  }
  .tc-app-shell-messages .tc-msg-compose{
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:min(960px,100%)!important;
    max-width:100%!important;
    height:auto!important;
    max-height:100%!important;
    margin:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    box-sizing:border-box!important;
    overscroll-behavior:contain!important;
  }
}
