/* StodolaPC PC104 — responsive chat, scoped to chat.php.
   Preserve PC99-102 messages, presence, zoom, sending and emoji JS. */
body.pc104-chat-page{overflow-x:clip}
body.pc104-chat-page .pc100-chat-title,
body.pc104-chat-page .pc25-room-list,
body.pc104-chat-page .pc25-room-archive,
body.pc104-chat-page .pc45-chat-layout,
body.pc104-chat-page #pc-chat{min-width:0;max-width:100%;box-sizing:border-box}
body.pc104-chat-page .pc45-chat-layout{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:0}
body.pc104-chat-page #pc-chat{width:100%;overflow:visible}
body.pc104-chat-page #pc-chat .pc-chat-bar{gap:10px;min-width:0}
body.pc104-chat-page #pc-chat .pc-chat-bar>div{min-width:0;overflow-wrap:anywhere}
/* Desktop: adapt conversation height to the available viewport rather than a fixed 560px. */
body.pc104-chat-page #pc-chat-log{
  box-sizing:border-box;width:100%;min-width:0;
  min-height:260px;max-height:clamp(330px,calc(100dvh - 370px),850px);
  overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;
}
body.pc104-chat-page #pc-chat-log .pc-chat-message{
  box-sizing:border-box;min-width:0;max-width:min(87%,900px);
  overflow-wrap:anywhere;word-break:normal;
}
body.pc104-chat-page #pc-chat-log .pc-chat-message p,
body.pc104-chat-page #pc-chat-log .pc-chat-message a{overflow-wrap:anywhere}
body.pc104-chat-page #pc-chat .pc101-chat-tools{box-sizing:border-box;min-width:0;max-width:100%}
body.pc104-chat-page #pc-chat .pc101-chat-tools>*{min-width:0}
body.pc104-chat-page #pc-chat .pc101-zoom{margin-left:0}
body.pc104-chat-page #pc-chat-form,
body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap,
body.pc104-chat-page #pc25-chat-composer{min-width:0;max-width:100%;box-sizing:border-box}
body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap>.input{min-width:0;width:0;flex:1 1 auto}
body.pc104-chat-page .pc25-room-link{min-width:0;max-width:100%;overflow-wrap:anywhere}
body.pc104-chat-page #pc101-online-control .pc101-online-popover{
  box-sizing:border-box;width:min(320px,calc(100vw - 28px));
  max-height:min(420px,55dvh);max-width:calc(100vw - 28px)
}
@media(max-width:760px){
  body.pc104-chat-page .pc100-chat-title{gap:8px;margin-bottom:10px}
  body.pc104-chat-page .pc100-chat-title h1{font-size:clamp(21px,5.4vw,30px);line-height:1.16;margin:0}
  body.pc104-chat-page .pc101-global{max-width:100%;white-space:normal}
  body.pc104-chat-page .pc25-room-list{margin:9px 0 12px;gap:6px}
  body.pc104-chat-page .pc25-room-link{padding:9px 10px;font-size:12px;line-height:1.3}
  body.pc104-chat-page #pc-chat .pc-chat-bar{padding:12px 13px;flex-wrap:wrap}
  body.pc104-chat-page #pc-chat .pc-chat-bar b{font-size:14px}
  body.pc104-chat-page #pc-chat-log{
    min-height:220px;max-height:clamp(250px,49dvh,650px);
    padding:12px 9px;gap:9px
  }
  body.pc104-chat-page #pc-chat-log .pc-chat-message{max-width:96%;padding:9px 10px}
  body.pc104-chat-page #pc-chat .pc101-chat-tools{margin:7px 9px;gap:6px;justify-content:space-between}
  body.pc104-chat-page #pc-chat .pc101-zoom{flex:0 1 auto;gap:4px}
  body.pc104-chat-page #pc-chat .pc101-online-control{flex:0 1 auto;margin-left:auto}
  body.pc104-chat-page #pc-chat .pc101-people-button{padding:6px 8px}
  body.pc104-chat-page #pc-chat-form{padding:10px 9px}
  body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap{gap:6px;flex-wrap:nowrap}
  body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap>.btn{
    flex:0 0 auto;width:auto!important;min-width:75px;padding:10px 11px;
    margin:0!important;white-space:nowrap
  }
  body.pc104-chat-page #pc-chat-form .pc25-emoji-toggle{flex:0 0 38px;width:38px;height:40px}
  body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap>.input{font-size:16px}
}
@media(max-width:410px){
  body.pc104-chat-page .pc101-header{align-items:flex-start}
  body.pc104-chat-page .pc101-global{font-size:11px;padding:6px 9px}
  body.pc104-chat-page #pc-chat-log{max-height:clamp(260px,48dvh,520px)}
  body.pc104-chat-page #pc-chat .pc101-chat-tools{flex-wrap:wrap}
  body.pc104-chat-page #pc-chat .pc101-zoom{order:1;flex:1 1 auto}
  body.pc104-chat-page #pc-chat .pc101-online-control{order:2;flex:0 0 auto}
  body.pc104-chat-page #pc-chat .pc101-zoom button{min-width:31px;padding:6px 7px}
  body.pc104-chat-page #pc101-zoom-value{min-width:30px!important;font-size:11px}
  body.pc104-chat-page #pc-chat .pc101-people-button{font-size:11px;gap:4px}
  body.pc104-chat-page #pc-chat .pc101-people-button svg{width:16px;height:16px}
  body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap>.btn{min-width:68px;padding:9px 8px;font-size:12px}
}
@media(max-width:350px){
  body.pc104-chat-page #pc-chat .pc101-chat-tools{gap:5px}
  body.pc104-chat-page #pc-chat .pc101-online-control{flex-basis:100%;display:flex;justify-content:flex-end}
  body.pc104-chat-page #pc-chat .pc101-zoom{flex:1 1 100%}
  body.pc104-chat-page #pc-chat-form .pc25-chat-input-wrap{gap:4px}
  body.pc104-chat-page #pc-chat-form .pc25-emoji-toggle{flex-basis:34px;width:34px}
}
@media(prefers-reduced-motion:reduce){
  body.pc104-chat-page #pc-chat-log{scroll-behavior:auto}
}
