/* Messages: search (@username / @group), group type (public / private) and mobile fit. Loaded last. */

/* header buttons: search + new group */
.dm-bar-btns{display:flex;align-items:center;gap:8px}

/* search row */
.dm-search{flex:none;display:flex;align-items:center;gap:10px;padding:2px 2px 10px}
.dm-search[hidden],.dm-sres[hidden]{display:none!important}
.dm-sbox{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:44px;padding:0 6px 0 13px;border-radius:14px;background:#1b1c1f;color:var(--txt-3,#8b919c);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.dm-sbox:focus-within{box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.dm-sbox input{flex:1;min-width:0;height:100%;padding:0;background:none;border:0;outline:0;color:var(--txt,#fff);font:500 16px var(--ui,system-ui,sans-serif)}  /* 16px so phones don't zoom in */
.dm-sbox input::placeholder{color:var(--txt-3,#7d838f)}
.dm-sbox button{flex:none;width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--txt-2,#a3a8b3);cursor:pointer}
.dm-scancel{flex:none;border:0;background:none;padding:10px 2px;color:var(--txt-1,#eee);font:600 14.5px var(--ui,system-ui,sans-serif);cursor:pointer}

/* results */
.dm-sres{flex:1 1 0;min-height:0;display:flex;flex-direction:column;gap:2px;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:14px}
.dm-scap{margin:10px 6px 4px;font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--txt-3,#889)}
.dm-snote{padding:34px 16px;text-align:center;font-size:14px;line-height:1.45;color:var(--txt-3,#8b919c)}
.dm-snote b{color:var(--txt-1,#eee)}
.dm-sres .dmr{min-width:0}
.dm-sres .dmr-tx{min-width:0;flex:1}
.dm-sres .dmr-tx small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* group type card (public / private radios) */
.gr-radio{position:relative;display:flex;align-items:flex-start;gap:14px;padding:10px 2px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.gr-radio input{position:absolute;opacity:0;pointer-events:none}
.gr-radio i{flex:none;width:22px;height:22px;margin-top:2px;border-radius:50%;border:2px solid #6b707b;display:grid;place-items:center;transition:border-color .15s}
.gr-radio i::after{content:"";width:10px;height:10px;border-radius:50%;background:#5aa2f2;transform:scale(0);transition:transform .15s}
.gr-radio input:checked+i{border-color:#5aa2f2}
.gr-radio input:checked+i::after{transform:scale(1)}
.gr-radio span{min-width:0}
.gr-radio b,.gr-typeline b{display:block;font:600 15.5px/1.25 var(--ui,system-ui,sans-serif);color:var(--txt,#fff)}
.gr-radio small,.gr-typeline small{display:block;margin-top:2px;font-size:13px;line-height:1.35;color:var(--txt-3,#8b919c)}
.gr-typeline{padding:4px 2px 2px}

/* public link editor + link actions */
.gr-pubrow{display:flex;align-items:center;height:46px;padding:0 12px;border-radius:12px;background:#121315;box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);overflow:hidden}
.gr-pubrow:focus-within{box-shadow:inset 0 0 0 1px rgba(90,162,242,.7)}
.gr-pre{flex:none;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7d838f;font:500 15px var(--ui,system-ui,sans-serif)}
.gr-pubrow input{flex:1;min-width:0;padding:0;background:none;border:0;outline:0;color:var(--txt,#fff);font:600 16px var(--ui,system-ui,sans-serif)}
.gr-note.good{color:#4cc38a}
.gr-note.bad{color:#ef6b6b}
#gr-hsave{width:100%;margin-top:10px}
.gr-actions2{gap:10px}
.gr-btn.blue{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#2d5f93!important;color:#fff!important}
.gr-btn.blue svg{flex:none}
.gr-linkbox input{font-size:16px}

/* ---- phone fit ---- */
@media(max-width:700px){
  .gr-ov{padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom));align-items:flex-end}
  .gr-sheet{max-height:calc(100dvh - 20px);border-radius:22px}
  .gr-ul,#gr-rn,#gr-name,.ch-compose textarea{font-size:16px}
  .gr-card{padding:12px 12px 14px}
  .dm-bar{padding-top:4px}
  .dmr{padding:11px 6px}
  .dmr-tx{min-width:0}
}
#gr-linkcard .gr-cap:not(:first-child){margin-top:18px}
#gr-linkcard .gr-reset{margin-top:12px}

/* ---- Chat: no more circles. Rounded squares for chips, avatars and buttons ---- */
html body #s-chat .stf,html body #s-chat .hotchip{border-radius:12px!important}
html body #s-chat .stf-av,html body #s-chat .stf-av img{border-radius:9px!important}
html body #s-chat .stf-av i{display:none!important}               /* online = green text under the name */
html body #s-chat .stf-tx small.on{color:var(--up,#1fd561)}
html body #s-chat .stf-quick button{border-radius:10px!important}
html body #s-chat .hotchip .hc-av{border-radius:7px}
html body #s-chat .hotchip .hc-go{border-radius:8px}
html body #s-chat .cm .cav{border-radius:9px}
html body #s-chat .vp .vav{border-radius:13px}
html body #s-chat .dmav,html body #s-chat .dmav img{border-radius:12px}
html body #s-chat .ch-compose textarea{border-radius:16px}
html body #s-chat .ch-send{border-radius:14px}
html body #s-chat .ch-new{border-radius:10px}
html body #s-chat .ch-state{border-radius:10px}

/* top search button: PC = search people, phones = show / hide coin search + trending */
html body #ch-tabs .ch-moretog{display:grid;place-items:center;flex:none;width:38px;height:38px;margin-left:0;padding:0;border-radius:11px}
@media(max-width:1023px) and (max-height:520px){ html body #ch-tabs .ch-moretog{display:none} }

/* ---- Support chips: no outer box. Each chip = pfp + name + tick, with the small line (DM for no fees) inside it ---- */
html body #s-chat .ch-staff{background:none!important;border:0!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;padding:10px 12px 4px!important}
html body #s-chat .ch-staff .stf-row{display:flex;flex-wrap:wrap;gap:8px;overflow:visible}
@media(min-width:1024px){html body #s-chat .ch-staff .stf-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}html body #s-chat .stc{width:100%;min-width:0}}
@media(max-width:1023px){html body #s-chat .ch-staff .stf-row{flex-wrap:nowrap;overflow-x:auto}}
html body #s-chat .stc{flex:none;display:inline-flex;align-items:center;gap:10px;max-width:100%;padding:7px 15px 7px 7px;border-radius:12px;
  background:rgba(var(--tm-hi,255,255,255),.07)!important;border:1px solid rgba(var(--tm-hi,255,255,255),.14)!important;color:var(--txt);font:inherit;text-align:left;cursor:pointer;
  -webkit-tap-highlight-color:transparent;transition:transform .1s,background .15s}
html body #s-chat .stc:active{transform:scale(.97)}
@media(hover:hover){html body #s-chat .stc:hover{background:rgba(var(--tm-hi,255,255,255),.12)!important}}
html body #s-chat .stc-av{flex:none;width:38px;height:38px;border-radius:10px;overflow:hidden;display:grid;place-items:center;background:var(--raised);font-size:12px;font-weight:800;color:var(--txt-2)}
html body #s-chat .stc-av img{width:100%;height:100%;object-fit:cover;display:block}
html body #s-chat .stc-tx{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;line-height:1.15;white-space:nowrap}
html body #s-chat .stc-nm{display:inline-flex;align-items:center;font-size:14px;font-weight:700}
html body #s-chat .stc small{display:block;font-size:11.5px;font-weight:600;color:var(--txt-3);white-space:nowrap}
html body #s-chat .stc small.on{color:var(--up,#1fd561)}
html body #s-chat .stc-pulse{background:rgba(46,230,107,.10)!important;border-color:rgba(46,230,107,.5)!important}
html body #s-chat .stc-pulse small{color:var(--up,#1fd561)}

/* ---- Admin panel: badge chips ---- */
.adm-bdg{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 10px}
.adm-chip{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:var(--txt-2,#aab);font:600 13px var(--ui,system-ui,sans-serif);padding:8px 12px;border-radius:10px;cursor:pointer}
.adm-chip.on{background:rgba(120,140,255,.22);border-color:rgba(150,170,255,.7);color:#fff}
