/* FlickChat v5.1. Mobile-first in-call layout inspired by the supplied screenshot.
   Visual only: this does not change matching, translation, or charging. */
#callVideoLayout{min-width:0}
#callVideoLayout .remote-card{min-width:0}
#callVideoLayout video{max-width:100%;object-position:center center}
#callVideoLayout .remote-card #remoteVideo{object-fit:cover}
#callVideoLayout.fc51-video-fit .remote-card #remoteVideo{object-fit:contain}
#callVideoLayout.fc51-video-fill .remote-card #remoteVideo{object-fit:cover}
.fc51-view-control{white-space:nowrap;position:relative;pointer-events:auto}
.fc51-effects-toggle{display:none!important}
#callVideoLayout .video-bottom{justify-content:flex-start;flex-wrap:wrap;right:16px;left:16px;gap:7px}
#callVideoLayout #connectionInfo{flex:1;min-width:105px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.fc51-activity{display:grid;gap:12px;margin:20px 0 26px}
.fc51-activity-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.fc51-activity-head h2{font-size:19px;color:#f4f0ff;margin-bottom:5px}
.fc51-activity-head p{font-size:12px;line-height:1.5;color:#a9a8c6}
.fc51-gift-heading{margin-top:12px}
.fc51-activity-list{display:grid;gap:9px}
.fc51-activity-list>p{font-size:13px;color:#acbad4;padding:15px;border:1px solid #454159;border-radius:12px;background:#16172a}
.fc51-activity-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:9px 15px;border:1px solid #403853;border-radius:13px;padding:13px 16px;background:#1c1b31}
.fc51-activity-row .fc51-main{display:flex;flex-direction:column;gap:5px;min-width:0}
.fc51-activity-row .fc51-main strong{font-size:13px;overflow-wrap:anywhere}
.fc51-activity-row .fc51-main time,.fc51-activity-row .fc51-main small{font-size:11px;color:#b8b1d2}
.fc51-activity-row .fc51-total{font-size:15px;font-weight:800;text-align:right;color:#dfb5ff;white-space:nowrap}
.fc51-activity-row .fc51-total small{display:block;font-size:10px;font-weight:500;color:#b6b3cb;margin-top:4px}
.fc51-activity-error{color:#ffb6be!important}
/* The app shifts into an immersive, full-width video view only during a call. */
.fc51-call-mode .shell{max-width:none;padding-left:12px;padding-right:12px}
.fc51-call-mode .topbar{height:auto;min-height:53px;padding:5px 0}
.fc51-call-mode .intro,.fc51-call-mode .upgrade-strip,.fc51-call-mode #hostEarningsBar{display:none!important}
.fc51-call-mode .app-grid{display:grid;position:relative;grid-template-columns:1fr!important;grid-template-rows:minmax(500px,calc(100svh - 183px))!important;gap:0}
.fc51-call-mode .app-grid .remote-card{grid-column:1;grid-row:1;min-height:500px;height:100%;border-radius:13px;overflow:hidden;background:#080e1a}
.fc51-call-mode .app-grid .remote-card .card-top{top:10px;left:12px;right:12px}
.fc51-call-mode .app-grid .self-card{top:15px;right:16px;left:auto;z-index:9;min-width:0;min-height:0;width:clamp(155px,17vw,230px);height:clamp(112px,11vw,150px);border:1px solid #ffffff55;border-radius:12px;box-shadow:0 6px 24px #0009}
.fc51-call-mode .app-grid .chat-panel{position:absolute;grid-column:unset;grid-row:unset;z-index:6;left:16px;bottom:58px;width:min(365px,40vw);height:min(40vh,350px);min-height:0;max-height:380px;display:flex;flex-direction:column;overflow:hidden;background:transparent;box-shadow:none;border:0;border-radius:0;pointer-events:none}
.fc51-call-mode .app-grid .chat-heading{display:none}
.fc51-call-mode .app-grid .messages{background:linear-gradient(0deg,rgba(4,8,18,.45) 0%,rgba(5,10,22,.1) 74%,transparent);max-height:none;min-height:0;flex:1;padding:10px 5px 8px;justify-content:flex-end;gap:6px;overflow-y:auto;pointer-events:auto;scrollbar-width:thin;overscroll-behavior:contain}
.fc51-call-mode .app-grid .message{background:rgba(16,23,38,.80);border:1px solid #ffffff2c;color:white;text-shadow:0 1px 2px #0009;font-size:12px;line-height:1.42;padding:7px 10px;border-radius:10px 10px 10px 3px;max-width:96%;backdrop-filter:blur(7px)}
.fc51-call-mode .app-grid .fc51-chat-sender{display:block;font-size:10px;font-weight:800;letter-spacing:.1px;color:#f2a4bd;margin-bottom:3px}
.fc51-call-mode .app-grid .message.mine .fc51-chat-sender{color:#bfc9ff}
.fc51-call-mode .app-grid .message .message-primary{display:block;overflow-wrap:anywhere}
.fc51-call-mode .app-grid .message.mine{background:rgba(56,32,99,.86);border-color:#b49af75f;align-self:flex-start;border-radius:10px 10px 3px 10px}
.fc51-call-mode .app-grid .system-message{color:#e0e0ed;background:#151c2a80;border:0;text-shadow:0 1px 2px #000a;font-size:10px;padding:7px 9px}
.fc51-call-mode .app-grid .chat-form{pointer-events:auto;flex:none;padding:8px 4px 2px;border:0;background:transparent;gap:5px}
.fc51-call-mode .app-grid .chat-form input{min-height:39px;border:1px solid #ffffff5e;background:rgba(8,12,26,.80);font-size:13px;color:white;backdrop-filter:blur(7px)}
.fc51-call-mode .app-grid .chat-form button{width:44px;height:40px;background:#6159c3}
.fc51-call-mode .app-grid.fc51-chat-hidden .chat-panel{display:none}
.fc51-call-mode .app-grid .fc48-gift-strip{position:absolute;right:15px;top:47%;left:auto;z-index:7;width:auto;margin:0;min-height:0;padding:6px;border:0;border-radius:16px;box-shadow:0 8px 22px #0007;background:rgba(17,25,46,.79);backdrop-filter:blur(10px);flex-direction:column;align-items:center;gap:4px}
.fc51-call-mode .app-grid .fc48-gift-strip>span{display:none}
.fc51-call-mode .app-grid .fc48-gift-strip button{height:54px;width:58px;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;font-size:0;padding:0;border:0;border-radius:13px;background:#1458da}
.fc51-call-mode .app-grid .fc48-gift-strip button::before{content:'🎁';font-size:25px}
.fc51-call-mode .app-grid .video-bottom{z-index:10;bottom:7px;left:12px;right:12px;color:white}
.fc51-call-mode .app-grid .video-bottom button{background:rgba(18,25,41,.88);color:#f8f8ff;border-color:#ffffff44;padding:7px 9px}
.fc51-call-mode .app-grid .group-video-grid{padding-top:155px;grid-template-columns:repeat(2,minmax(0,1fr))}
.fc51-call-mode .app-grid .group-call-banner{top:65px}
.fc51-call-mode .control-bar{z-index:11;position:relative;margin-top:5px;padding:9px 12px;border-radius:11px;background:#121624eF}
.fc51-call-mode .control-bar .controls{gap:7px;flex-wrap:wrap}
.fc51-call-mode .control-bar .control-intro{min-width:135px}
@media(max-width:950px){
 .fc51-call-mode .topbar .beta-pill{display:none}
 .fc51-call-mode .app-grid .chat-panel{width:min(340px,53vw)}
 .fc51-call-mode .app-grid .group-video-grid{padding-top:150px!important}
}
@media(max-width:650px){
 .shell{padding-left:8px!important;padding-right:8px!important}
 #callVideoLayout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(470px,70svh) auto;gap:8px}
 #callVideoLayout .remote-card{min-height:470px}
 #callVideoLayout .self-card{min-height:0;max-width:145px;width:33vw;height:clamp(83px,24vw,116px);top:10px;right:10px}
 #callVideoLayout:not(.fc51-video-fill) .remote-card #remoteVideo{object-fit:contain}
 #callVideoLayout .remote-card #remoteVideo{object-position:center}
 .fc51-call-mode .shell{padding-left:0!important;padding-right:0!important}
 .fc51-call-mode .topbar{padding:5px 8px!important;gap:6px}
 .fc51-call-mode .brand{font-size:18px}
 .fc51-call-mode .site-nav{min-width:0;overflow-x:auto;max-width:100%;scrollbar-width:none}
 .fc51-call-mode .site-tab{padding:7px;font-size:10px;white-space:nowrap;flex:0 0 auto}
 .fc51-call-mode .topbar .nav-right{max-width:100%;gap:4px}
 .fc51-call-mode .nav-right .nav-button{padding:6px 8px}
 .fc51-call-mode .ui-language-picker{min-width:85px;max-width:104px}
 .fc51-call-mode .app-grid{grid-template-rows:minmax(450px,calc(100svh - 215px))!important}
 .fc51-call-mode .app-grid .remote-card{min-height:450px;border-radius:0;height:100%}
 .fc51-call-mode .app-grid .card-top{top:5px;left:8px;right:8px}
 .fc51-call-mode .app-grid .self-card{top:10px;right:9px;width:clamp(103px,30vw,148px);height:clamp(76px,24vw,112px);z-index:9;border-radius:9px}
 .fc51-call-mode .app-grid .self-card .card-top{top:3px;left:4px;right:4px}
 .fc51-call-mode .app-grid .self-card .camera-label{font-size:7px}
 .fc51-call-mode .app-grid .chat-panel{left:8px;bottom:51px;width:min(78vw,350px);height:min(38svh,280px)}
 .fc51-call-mode .app-grid .messages{padding-left:1px;padding-right:2px;gap:5px}
 .fc51-call-mode .app-grid .message{font-size:11px;padding:6px 8px;max-width:91%}
 .fc51-call-mode .app-grid .fc48-gift-strip{right:8px;top:43%;padding:4px;border-radius:12px}
 .fc51-call-mode .app-grid .fc48-gift-strip button{height:47px;width:45px}
 .fc51-call-mode .app-grid .video-bottom{left:8px;right:8px;bottom:6px;gap:4px;font-size:9px}
 .fc51-call-mode .app-grid .video-bottom button{font-size:10px;padding:6px}
 .fc51-call-mode .app-grid #connectionInfo{max-width:85px;min-width:0}
 .fc51-call-mode .app-grid.group-call-active .group-video-grid{padding:133px 7px 48px!important;gap:6px}
 .fc51-call-mode .app-grid .group-call-banner{top:58px;left:8px;max-width:calc(100% - 160px)}
 .fc51-call-mode .app-grid.group-call-active .group-member{min-height:0;overflow:hidden}
 .fc51-call-mode .app-grid.group-call-active .group-member video{object-fit:contain}
 .fc51-call-mode .control-bar{border-radius:0;margin-top:0;padding:7px 9px;position:sticky;bottom:0;max-height:min(240px,44svh);overflow-y:auto;box-shadow:0 -9px 30px #0008;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .fc51-call-mode .control-intro{display:none}
 .fc51-call-mode .control-bar .controls{justify-content:center;gap:5px}
 .fc51-call-mode .control-bar .controls>.nav-button,.fc51-call-mode .control-bar .controls>.audio-input-select{display:none}
 .fc51-call-mode .control-bar .controls>.fc51-effects-toggle{display:inline-flex!important;padding:9px 7px;font-size:11px}
 .fc51-call-mode .control-bar #v50CameraPanel{display:none}
 .fc51-call-mode #videoView.fc51-effects-open .control-bar #v50CameraPanel:not(.hidden){display:flex}
 .fc51-call-mode .control-bar .controls .circle-control{height:38px;width:38px}
 .fc51-call-mode .control-bar .controls .next-button,.fc51-call-mode .control-bar .controls .stop-button{padding:11px;font-size:11px;flex:0 1 auto}
 .fc51-activity-row{padding:11px;grid-template-columns:minmax(0,1fr) auto;gap:7px}
 .fc51-activity-row .fc51-total{font-size:13px}
 .fc51-activity-head h2{font-size:16px}
}
@media(max-width:420px){
 .fc51-call-mode .app-grid .chat-panel{width:75vw;height:min(34svh,245px)}
 .fc51-call-mode .app-grid .chat-form input{min-height:36px;font-size:12px}
 .fc51-call-mode .app-grid .chat-form button{height:36px;width:39px}
}

/* Three-person calls retain two large side-by-side videos; compact overlay chat. */
.fc51-call-mode .app-grid.group-call-active .chat-panel{width:min(300px,27vw);height:min(27vh,210px)}
@media(max-width:650px){.fc51-call-mode .app-grid.group-call-active .chat-panel{width:min(66vw,255px);height:min(23svh,170px)}}

/* v5.1.1: The screenshot-style composition is the actual Video-page layout,
   not a skin that appears only after a particular socket message. */
#videoView #callVideoLayout{
 display:grid;position:relative;min-width:0;
 grid-template-columns:minmax(0,1fr)!important;
 grid-template-rows:minmax(480px,72svh)!important;
 gap:0!important;
}
#videoView #callVideoLayout>.remote-card{
 grid-column:1;grid-row:1;min-width:0;min-height:480px;
 height:100%;overflow:hidden;border-radius:13px;
}
#videoView #callVideoLayout>.self-card{
 position:absolute!important;grid-column:auto!important;grid-row:auto!important;
 top:14px;right:14px;left:auto;bottom:auto;z-index:9;
 min-width:0;min-height:0;width:clamp(145px,17vw,230px);
 height:clamp(105px,11vw,150px);
 border:1px solid #ffffff55;border-radius:12px;
 box-shadow:0 6px 25px #0009;
}
#videoView #callVideoLayout>.chat-panel{
 position:absolute!important;grid-column:auto!important;grid-row:auto!important;
 left:15px;bottom:56px;z-index:6;
 width:min(370px,40vw);height:min(38svh,330px);
 min-height:0;max-height:none;display:flex;flex-direction:column;
 overflow:hidden;border:0;border-radius:0;box-shadow:none;
 background:transparent;pointer-events:none;
}
#videoView #callVideoLayout .chat-heading{display:none}
#videoView #callVideoLayout .messages{
 background:linear-gradient(0deg,#05091399,transparent 78%);
 flex:1;max-height:none;min-height:0;padding:9px 4px;
 justify-content:flex-end;gap:6px;overflow-y:auto;pointer-events:auto;
}
#videoView #callVideoLayout .message{
 align-self:flex-start;max-width:96%;font-size:12px;line-height:1.45;
 padding:7px 10px;border-radius:10px;
 border:1px solid #ffffff30;color:white;background:#121b31d9;
 text-shadow:0 1px 2px #0007;backdrop-filter:blur(5px);
}
#videoView #callVideoLayout .message.mine{
 align-self:flex-start;background:#30214ccf;border-color:#a684ff7a;
}
#videoView #callVideoLayout .chat-form{
 flex:none;pointer-events:auto;display:flex;padding:5px 3px 2px;
 background:transparent;border:0;gap:5px;
}
#videoView #callVideoLayout .chat-form input{
 color:white;background:#11192fdc;border:1px solid #ffffff55;min-height:38px;
}
#videoView #callVideoLayout .chat-form button{height:39px;width:43px;background:#2566e9}
#videoView #callVideoLayout.fc51-chat-hidden>.chat-panel{display:none}
#videoView #callVideoLayout:not(.fc51-call-engaged)>.chat-panel{display:none}
#videoView #callVideoLayout>.fc48-gift-strip:not(.hidden){
 position:absolute;z-index:8;top:43%;right:12px;left:auto;
 width:auto;margin:0;padding:5px;border:0;border-radius:13px;
 flex-direction:column;align-items:center;background:#141c32e6;
 box-shadow:0 7px 24px #0008;
}
#videoView #callVideoLayout>.fc48-gift-strip>span{display:none}
#videoView #callVideoLayout>.fc48-gift-strip button{
 width:51px;height:50px;min-width:0;padding:0;border-radius:11px;
 font-size:0!important;display:grid;place-items:center;
}
#videoView #callVideoLayout>.fc48-gift-strip button::before{content:'🎁';font-size:25px}
body.fc51-call-mode #videoView #callVideoLayout{
 grid-template-rows:minmax(470px,calc(100svh - 185px))!important;
}
@media(max-width:650px){
 #videoView #callVideoLayout{
  grid-template-rows:minmax(430px,66svh)!important;
 }
 #videoView #callVideoLayout>.remote-card{min-height:430px;border-radius:10px}
 #videoView #callVideoLayout>.self-card{
  top:8px;right:8px;width:clamp(104px,30vw,147px);
  height:clamp(78px,24vw,110px);min-height:0;max-width:none;
 }
 #videoView #callVideoLayout>.chat-panel{
  left:8px;bottom:48px;width:min(72vw,285px);
  height:min(32svh,240px);
 }
 #videoView #callVideoLayout>.chat-panel .message{font-size:11px;padding:6px 8px}
 #videoView #callVideoLayout>.fc48-gift-strip:not(.hidden){right:7px;top:40%}
 #videoView #callVideoLayout>.fc48-gift-strip button{width:43px;height:45px}
 body.fc51-call-mode #videoView #callVideoLayout{
  grid-template-rows:minmax(430px,calc(100svh - 210px))!important;
 }
}
