/* Messenger in the new look (ttc-messenger.js): chats on the left, the chat in the middle (chat-dock.js's window, .dk-full),
   chat info on the right. Phones: the list, then the chat full screen. */
body.tmv-on #ttc-feed-app{display:flex;flex-direction:column;height:100dvh;overflow:hidden}
body.tmv-on #ttc-feed-app>.tf-header{position:relative;flex:none}
.tmv-app{flex:1;min-height:0;display:flex;gap:8px;padding:8px;max-width:1800px;width:100%;margin:0 auto;box-sizing:border-box}
.tmv-app *{box-sizing:border-box}
#ttc-feed-app .tmv-app h1,#ttc-feed-app .tmv-app h2,#ttc-feed-app .tmv-app h3{letter-spacing:0;text-transform:none;color:#E8F1F3}
:where(.tmv-app,.tmv-sheet,.tmv-callbar) button{font:inherit;color:inherit;cursor:pointer;margin:0;padding:0;border:0;background:none;border-radius:0}
.tmv-ib{flex:none;width:36px;height:36px;border-radius:50%;border:0;padding:0;background:#1A2B31;color:#E8F1F3;display:inline-grid;place-items:center;list-style:none;cursor:pointer}
.tmv-ib::-webkit-details-marker{display:none}
@media(hover:hover){.tmv-ib:hover{background:#23363D}}
.tmv-ib .tf-ic{width:20px;height:20px}

/* Left: the chats list */
.tmv-side{flex:none;width:min(360px,34vw);min-width:300px;min-height:0;display:flex;flex-direction:column;background:#111D22;border:1px solid #1E2F36;border-radius:14px;overflow:hidden}
.tmv-side-head{display:flex;align-items:center;gap:8px;padding:14px 12px 4px 16px}
#ttc-feed-app .tmv-side-head h1{flex:1;margin:0;font:700 24px/1.2 'Space Grotesk',Inter,sans-serif}
.tmv-more{position:relative}
.tmv-more>summary.tmv-ib{list-style:none;width:36px;height:36px;border-radius:50%;color:#E8F1F3}
.tmv-more .tf-menu{right:0;left:auto;min-width:250px}
.tmv-search{display:flex;align-items:center;gap:8px;margin:8px 12px 2px;height:38px;padding:0 12px;border-radius:999px;background:#1A2B31;color:#8FA6AD}
.tmv-search .tf-ic{width:18px;height:18px}
.tmv-search input,.tmv-search input:focus{flex:1;min-width:0;height:36px;border:0;background:none;color:#E8F1F3;font:15px Inter,sans-serif;outline:none!important;padding:0;box-shadow:none;border-radius:0}
.tmv-search input::-webkit-search-cancel-button{filter:invert(1)}
.tmv-search:focus-within{box-shadow:0 0 0 2px #3FD2E866}
.tmv-chips{display:flex;gap:6px;padding:8px 12px}
.tmv-chips button{border:0;border-radius:999px;padding:7px 14px;background:#1A2B31;color:#C9D8DC;font-weight:600;font-size:14px}
.tmv-chips button[aria-selected=true]{background:#3FD2E826;color:#3FD2E8}
.tmv-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 6px 10px}
.tmv-row{display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border:0;border-radius:12px;background:none;color:#E8F1F3!important;text-decoration:none!important;text-align:left}
@media(hover:hover){.tmv-row:hover{background:#ffffff0a}}
.tmv-row.on{background:#3FD2E81c}
.tmv-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.tmv-row-main strong{font-size:15px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tmv-row-main small{display:flex;min-width:0;font-size:13px;color:#8FA6AD}
.tmv-prev{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tmv-time{flex:none;white-space:pre}
.tmv-row.unread strong{font-weight:700}
.tmv-row.unread small{color:#E8F1F3;font-weight:600}
.tmv-unread{flex:none;width:12px;height:12px;border-radius:50%;background:#3FD2E8}
.tmv-muted{flex:none;font-size:13px;opacity:.7}
.tmv-empty{margin:0;padding:28px 16px;text-align:center;color:#8FA6AD;font-size:14px}

/* Photos with an active dot */
.tmv-face{position:relative;display:inline-flex;flex:none;width:var(--s);height:var(--s)}
.tmv-face>.tf-av{width:var(--s)!important;height:var(--s)!important}
.tmv-group{width:var(--s,52px);height:var(--s,52px);border-radius:50%;background:#23363D;color:#C9D8DC;display:grid;place-items:center}
.tmv-group .tf-ic{width:45%;height:45%}
.tmv-chan{background:#3FD2E826;color:#3FD2E8;font:700 calc(var(--s,52px)*.42) 'Space Grotesk',Inter,sans-serif}
.tmv-list-label,#ttc-feed-app .tmv-list-label{margin:12px 12px 2px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8FA6AD}
.tmv-group.big{--s:80px}
.tmv-dot{position:absolute;right:0;bottom:0;width:28%;height:28%;min-width:12px;min-height:12px;border-radius:50%;background:#31D46B;border:3px solid #111D22}
.tmv-dot.away{background:#F5C97F}

/* Notes row, like Messenger's */
.tmv-notes{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;padding:4px 8px 2px}
.tmv-notes::-webkit-scrollbar{display:none}
.tmv-note{flex:none;position:relative;width:86px;padding:34px 0 4px;display:flex;flex-direction:column;align-items:center;gap:4px;border:0;background:none;color:#C9D8DC!important;text-decoration:none!important}
.tmv-note small{font-size:12px;max-width:80px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tmv-note-bub{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:1;width:max-content;max-width:80px;padding:5px 9px;border-radius:14px;background:#23363D;color:#E8F1F3;font-size:11px;line-height:1.2;text-align:center;box-shadow:0 2px 8px #0006;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.tmv-note-bub.empty{color:#8FA6AD}
.tmv-note.mine .tmv-note-bub.empty{border:1px dashed #3A535B;background:#16252B}

/* Middle: the chat */
.tmv-center{flex:1;min-width:0;min-height:0;display:flex}
.tmv-center>*{flex:1;min-width:0}
.dk-win.dk-full{position:relative;right:auto!important;bottom:auto;z-index:auto;width:auto;height:auto;min-height:0;border:1px solid #1E2F36;border-radius:14px;box-shadow:none;transition:none}
.dk-win.dk-full:has(.dk-call .room-call:not([hidden])){width:auto;height:auto}
.dk-full .dk-head{padding:10px 10px 10px 12px;border-radius:14px 14px 0 0;gap:6px}
.dk-full .dk-head .dk-av .chat-avatar{width:42px!important;height:42px!important}
.dk-full .dk-name-line{max-width:none}
.dk-full .dk-name strong{font-size:16px}
.dk-full .dk-name small{font-size:13px}
.dk-full .dk-tools{gap:4px}
.dk-full .dk-tools .dk-ib{width:38px;height:38px}
.dk-full .dk-tools .dk-ic{width:22px;height:22px}
.dk-full .dk-log{padding:16px 18px 6px}
.dk-full .dk-stack{max-width:min(68%,620px)}
.dk-full .dk-foot{padding:6px 14px 14px}
.dk-full .dk-menu{right:auto;width:min(400px,calc(100% - 16px));top:66px;max-height:calc(100% - 80px)}
.dk-full .dk-info-btn[aria-pressed=true]{background:#3FD2E826}
.tmv-blank{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;text-align:center;background:#111D22;border:1px solid #1E2F36;border-radius:14px;color:#8FA6AD}
#ttc-feed-app .tmv-blank h2{margin:4px 0 0;font:700 22px 'Space Grotesk',Inter,sans-serif}
.tmv-blank p{margin:0}
.tmv-blank-ic{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:#3FD2E81c;color:#3FD2E8}
.tmv-blank-ic .tf-ic{width:34px;height:34px}

/* New message */
.tmv-new{display:flex;flex-direction:column;min-height:0;background:#111D22;border:1px solid #1E2F36;border-radius:14px;overflow:hidden}
.tmv-new-head{display:flex;align-items:center;gap:8px;padding:14px 16px;border-bottom:1px solid #1E2F36;font-size:17px}
.tmv-to{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 16px;border-bottom:1px solid #1E2F36}
.tmv-to>span{color:#8FA6AD}
.tmv-to-chips{display:contents}
.tmv-chip{border:0;border-radius:999px;padding:5px 10px;background:#3FD2E826;color:#3FD2E8;font-weight:600;font-size:13px}
.tmv-to input,.tmv-to input:focus{flex:1;min-width:140px;height:34px;border:0;background:none;color:#E8F1F3;font:15px Inter,sans-serif;outline:none!important;padding:0;box-shadow:none;border-radius:0}
.tmv-new>.ta-btn{margin:10px 16px 0;align-self:flex-start}
.tmv-to-list{flex:1;min-height:0;overflow-y:auto;padding:8px}
.tmv-to-row{display:flex;align-items:center;gap:6px;border-radius:12px}
@media(hover:hover){.tmv-to-row:hover{background:#ffffff0a}}
.tmv-to-pick{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:8px;border:0;background:none;text-align:left}
.tmv-to-pick>span:last-child{display:flex;flex-direction:column;min-width:0}
.tmv-to-pick strong{font-weight:600}
.tmv-to-pick small{color:#8FA6AD;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tmv-app .tmv-to-add{flex:none;width:36px;height:36px;margin-right:8px;border-radius:50%;border:1px solid #2A3F46;color:#3FD2E8;font-size:20px;line-height:1;display:grid;place-items:center}
.tmv-hint{margin:0;padding:10px 16px 14px;font-size:13px;color:#8FA6AD;border-top:1px solid #1E2F36}

/* Right: chat info */
.tmv-info{flex:none;width:320px;min-height:0;overflow-y:auto;position:relative;padding:22px 12px 16px;background:#111D22;border:1px solid #1E2F36;border-radius:14px}
.tmv-info[hidden]{display:none}
.tmv-info-x{position:absolute;top:10px;right:10px}
.tmv-info-top{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:0 8px}
#ttc-feed-app .tmv-info-top h2{margin:6px 0 0;font:700 18px Inter,sans-serif;overflow-wrap:anywhere}
.tmv-info-top small{color:#8FA6AD;font-size:13px}
.tmv-info-btns{display:flex;justify-content:center;gap:18px;margin:14px 0 10px}
.tmv-round{display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:none;color:#E8F1F3!important;text-decoration:none!important;font-size:12px}
.tmv-round>span{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#23363D;font-size:18px}
.tmv-round .tf-ic{width:20px;height:20px}
@media(hover:hover){.tmv-round:hover>span{background:#2C4249}}
.tmv-sec{border-radius:10px}
.tmv-sec>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:12px 10px;border-radius:10px;font-weight:600;font-size:15px;cursor:pointer}
.tmv-sec>summary::-webkit-details-marker{display:none}
.tmv-sec>summary::after{content:'';width:8px;height:8px;border:solid #8FA6AD;border-width:0 2px 2px 0;transform:rotate(45deg);margin:-4px 4px 0}
.tmv-sec[open]>summary::after{transform:rotate(-135deg);margin-top:4px}
@media(hover:hover){.tmv-sec>summary:hover{background:#ffffff0a}}
.tmv-sec>div{display:flex;flex-direction:column;gap:2px;padding:0 2px 6px}
.tmv-act,.tmv-member{display:flex;align-items:center;gap:12px;width:100%;padding:7px 8px;border:0;border-radius:10px;background:none;color:#E8F1F3!important;text-decoration:none!important;text-align:left;font-size:15px}
@media(hover:hover){.tmv-act:hover,.tmv-member:hover{background:#ffffff0a}}
.tmv-act-ic{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#23363D;font-size:16px}
.tmv-act.danger{color:#FF9A9A!important}

/* Phone chat info sheet */
.tmv-sheet{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;background:#0F1A1F;color:#E8F1F3;font-family:Inter,system-ui,sans-serif}
.tmv-sheet::backdrop{background:#000a}
.tmv-sheet-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:10px;padding:max(10px,env(safe-area-inset-top)) 12px 10px;background:#0F1A1F;border-bottom:1px solid #1E2F36;font-size:17px}
.tmv-sheet-body{padding:18px 12px max(24px,env(safe-area-inset-bottom))}
.tmv-sheet .tmv-face{--s:88px}
.tmv-sheet h2{margin:6px 0 0;font:700 20px Inter,sans-serif}

/* Someone's calling */
.tmv-callbar{position:fixed;z-index:130;left:16px;bottom:16px;width:min(380px,calc(100vw - 24px));display:flex;align-items:center;gap:10px;padding:10px 10px 10px 12px;border-radius:16px;
  background:#16303A;border:1px solid #3FD2E866;box-shadow:0 18px 48px #000c;color:#E8F1F3;animation:tmv-ring 1.6s ease-in-out infinite}
.tmv-callbar[hidden]{display:none}
.tmv-call-ic{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#31D46B33;font-size:20px}
.tmv-call-text{flex:1;min-width:0;display:flex;flex-direction:column}
.tmv-call-text strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tmv-call-text small{color:#9FE6F1;font-size:13px}
.tmv-call-no{flex:none;width:38px;height:38px;border-radius:50%;border:0;background:#23363D;color:#E8F1F3;display:grid;place-items:center;cursor:pointer}
.tmv-call-no .tf-ic{width:18px;height:18px}
.tmv-call-yes{flex:none;height:38px;padding:0 16px;border-radius:19px;border:0;background:#31D46B;color:#06240F;font:700 14px Inter,sans-serif;cursor:pointer}
@keyframes tmv-ring{0%,100%{box-shadow:0 18px 48px #000c,0 0 0 0 #31D46B55}50%{box-shadow:0 18px 48px #000c,0 0 0 8px #31D46B00}}
body.ttc-calm .tmv-callbar{animation:none}

/* Classic Messenger's way back */
.tmv-try{margin-left:auto;border:1px solid #3FD2E866;border-radius:999px;background:#3FD2E81a;color:#3FD2E8;font-weight:700;padding:6px 12px;cursor:pointer}

/* Medium screens: chat info floats over the chat instead of squeezing it */
@media(max-width:1199px) and (min-width:761px){
  .tmv-info{position:fixed;z-index:60;right:16px;top:84px;bottom:16px;box-shadow:0 18px 48px #000c}
}
/* Room for the floating tab bar where it shows (up to 759px it's the phone layout below) */

/* Phones: the list, then the chat full screen */
@media(max-width:760px){
  body.tmv-on #ttc-feed-app{display:block;height:auto;min-height:100dvh;overflow:visible;background:#0F1A1F}
  body.tmv-on #ttc-feed-app>.tf-header{position:sticky;top:0}
  .tmv-app{display:block;padding:0;gap:0}
  .tmv-side{width:auto;min-width:0;border:0;border-radius:0;background:#0F1A1F;overflow:visible;padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .tmv-side-head{padding:10px 10px 2px 16px}
  .tmv-list{overflow:visible;padding:0 4px}
  .tmv-row{padding:8px 12px}
  .tmv-dot{border-color:#0F1A1F}
  .tmv-center,.tmv-info{display:none}
  body.tmv-thread #ttc-feed-app>.tf-header,body.tmv-thread .tf-tabbar,body.tmv-thread .tmv-side{display:none!important}
  body.tmv-thread .tmv-center{display:flex;position:fixed;z-index:50;left:0;right:0;top:var(--tmv-top,0px);height:var(--tmv-h,100dvh);background:#0F1A1F}
  body.tmv-thread{overflow:hidden}
  .dk-win.dk-full{border:0;border-radius:0}
  .dk-full .dk-head{border-radius:0;padding:max(8px,env(safe-area-inset-top)) 6px 8px 4px}
  .dk-full .dk-foot{padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .dk-full .dk-log{padding:12px 10px 6px}
  .dk-full .dk-stack{max-width:78%}
  .dk-full .dk-back{color:#E8F1F3}
  .dk-full .dk-menu{left:6px;right:6px;width:auto;top:60px}
  .tmv-new{border:0;border-radius:0}
  .tmv-new-head{padding-top:max(12px,env(safe-area-inset-top))}
  .tmv-callbar{top:max(10px,env(safe-area-inset-top));bottom:auto;left:12px;right:12px;width:auto}
}
