
/* vchat specific (ported from user's style.css) */
:root{
  --line: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
}

/* keep body scrolling controlled by layout, but allow content scroll areas */
/*body{ overflow:hidden; }*/

/* main content should stretch */
.vchat-wrap{ display:flex; flex-direction:column; height:100%; min-height:0; }
.vchat-body{ flex:1 1 auto; min-height:0; overflow:hidden; }

/* Cards */
.cardx{
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.cardx__head{
  padding:6px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}
.cardx__foot{
  padding:12px 16px;
  border-top:1px solid rgba(255,255,255,.10);
  color:var(--muted);
  font-size:12px;
}
.muted{ color:var(--muted); font-size:12px; }
.chip-live{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.2px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(124,92,255,.18);
  border:1px solid rgba(124,92,255,.28);
}

/* Character box */
.charbox{
  flex: 1;
  min-height: clamp(360px, 52vh, 640px);
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow:hidden;
}
.charbox__bg{
  position:absolute; inset:0;
  /*background-image:url("../img/character_bg.png");*/
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  z-index:1;
}
.charbox__bg::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.55));
}
.char-media{
  position:relative;
  width:100%;
  height:130%;
  object-fit:cover;
  object-position:center 58%;
  display:block;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.55));
  pointer-events:none;
  z-index:2;
}
@media (max-width: 768px){
  .charbox{ min-height: 360px; }
  .char-media{
    height:135%;
    object-position:center 62%;
	}
}

/* Speaking indicator */
.speaking-indicator{
  position:absolute;
  bottom:16px;
  left:16px;
  display:none;
  align-items:center;
  gap:6px;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  z-index:3;
}
.speaking-indicator .dot{
  width:8px; height:8px; border-radius:99px;
  background: rgba(229,231,235,.7);
  animation: bounce 1.1s infinite ease-in-out;
}
.speaking-indicator .dot:nth-child(2){ animation-delay:.15s; }
.speaking-indicator .dot:nth-child(3){ animation-delay:.3s; }
@keyframes bounce{
  0%,80%,100%{ transform: translateY(0); opacity:.6; }
  40%{ transform: translateY(-5px); opacity:1; }
}

/* Chat */
.chatpanel{ display:flex; flex-direction:column; min-height:0; height:100%; }
.chat{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:16px;
}
.day-divider{
  display:flex;
  justify-content:center;
  margin:6px 0 12px;
}
.day-divider span{
  font-size:12px;
  color:var(--muted);
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  background: rgba(255,255,255,.02);
}
.msg{ display:flex; margin:10px 0; }
.msg--other{ justify-content:flex-start; }
.msg--me{ justify-content:flex-end; }
.bubble{
  max-width:78%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.msg--me .bubble{
  background: rgba(124,92,255,.14);
  border-color: rgba(124,92,255,.25);
}
.meta{ font-size:11px; color:var(--muted); margin-bottom:4px; }
.text{ white-space:pre-wrap; line-height:1.35; }


/* Layout show/hide chat (works with app.js) */
#layout.is-chat-closed .chatpanel{ display:none !important; }
/* when chat is closed, let character column take full width even on lg+ */
#btnToggleChat { display: none; }
@media (min-width: 760px){
  #layout.is-chat-closed .col-main{
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  #layout.is-chat-closed .col-chat{ display:none !important; }
    #btnToggleChat { display: block; }
}
@media (min-width: 760px){
  #layout.is-chat-open .chatpanel{ display:flex !important; }
}

/* Composer */
.composer{
  position: sticky;
  bottom: 0;
  z-index: 50;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.20));
  border-top: none;
}
.composer-inner{
  display:flex;
  align-items:center;
  gap:12px;
}
.inputwrap{
  flex:1;
  display:flex;
  min-width:0;
  align-items:center;
}
#input{
  width:100%;
  height:44px;
  min-height:44px;
  max-height:44px;
  resize:none;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 10px 12px;
  outline:none;
}
#input::placeholder{ color: rgba(229,231,235,.45); }
#input:focus{
  border-color: rgba(124,92,255,.55);
  box-shadow: 0 0 0 4px rgba(124,92,255,.18);
}

.mic.is-recording{
  border-color: rgba(239,68,68,.55) !important;
  box-shadow: 0 0 0 4px rgba(239,68,68,.18) !important;
}

/* Status bar */
.statusbar{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 60;
  font-size:12px;
  color: var(--muted);
  pointer-events:none;
}
.statusbar .ok{ color: rgba(34,197,94,.95); }
.statusbar .bad{ color: rgba(239,68,68,.95); }
