/* GattoMusic 9.69 - chamadas compactas em 100% + salas WebRTC P2P */

/* A superfície de chamada da 9.68 tinha altura mínima grande. Em 9.69 o painel
   usa a viewport real e preserva todas as ações sem exigir Ctrl+scroll/zoom. */
body.gattomusic-v92-call-surface #chatCallModal .chat-call-panel,
#chatCallModal .chat-call-panel {
  width: min(1060px, calc(100vw - 20px)) !important;
  max-height: calc(100dvh - 14px) !important;
  min-height: 0 !important;
  align-content: start !important;
  gap: clamp(7px, 1.1vh, 11px) !important;
  padding: clamp(12px, 1.5vw, 18px) !important;
  overflow: auto !important;
  overscroll-behavior: contain;
}
#chatCallModal .chat-call-panel > .eyebrow {
  font-size: clamp(.86rem, 1.1vw, 1rem) !important;
  line-height: 1.15 !important;
  letter-spacing: .10em !important;
  font-weight: 900 !important;
}
#chatCallModal .chat-call-panel > h2 {
  font-size: clamp(1.65rem, 2.4vw, 2.15rem) !important;
  line-height: 1.08 !important;
  margin: 0 !important;
}
#chatCallModal .chat-call-status,
#chatCallModal .chat-call-elapsed-v957,
#chatCallModal .chat-call-started-v969 {
  font-size: clamp(.98rem, 1.35vw, 1.08rem) !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  margin: 0 !important;
}
body.gattomusic-v92-call-surface #chatCallModal .chat-call-stage.video,
#chatCallModal .chat-call-stage.video {
  min-height: clamp(220px, 40dvh, 470px) !important;
  max-height: 48dvh !important;
}
#chatCallModal .chat-call-stage.voice {
  min-height: clamp(110px, 17dvh, 180px) !important;
}
#chatCallModal .chat-call-device-controls {
  gap: 7px !important;
  padding: 8px !important;
}
#chatCallModal .chat-call-device-field { gap: 4px !important; }
#chatCallModal .chat-call-device-field > span { font-size: .78rem !important; }
#chatCallModal .chat-call-device-select { min-height: 35px !important; padding: 6px 8px !important; font-size: .82rem !important; }
#chatCallModal .chat-call-actions { gap: 7px !important; }
#chatCallModal .chat-call-actions .button {
  min-height: 38px !important;
  padding: 7px 11px !important;
  font-size: clamp(.79rem, 1vw, .88rem) !important;
}
#chatCallModal .chat-call-privacy,
#chatCallModal .chat-call-panel > small,
#chatCallModal .chat-call-panel > p:last-child { margin: 0 !important; line-height: 1.25 !important; }
.chat-call-recovery-v969 {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px;
  padding: 7px 9px; border: 1px solid color-mix(in srgb,var(--secondary) 35%,var(--line));
  border-radius: 12px; background: color-mix(in srgb,var(--panel) 88%,var(--secondary) 12%);
}
.chat-call-recovery-text { font: 800 .82rem/1.2 Verdana,Arial,sans-serif; }
.chat-call-recovery-v969 .button { min-height: 34px; padding: 6px 9px; font-size: .78rem; }

@media (max-width: 760px), (max-height: 760px) {
  #chatCallModal .chat-call-panel { width: calc(100vw - 8px) !important; max-height: calc(100dvh - 6px) !important; padding: 10px !important; gap: 6px !important; border-radius: 15px !important; }
  #chatCallModal .chat-call-panel > h2 { font-size: clamp(1.4rem, 6vw, 1.82rem) !important; }
  #chatCallModal .chat-call-panel > .eyebrow { font-size: .83rem !important; }
  #chatCallModal .chat-call-status,#chatCallModal .chat-call-elapsed-v957,#chatCallModal .chat-call-started-v969 { font-size: .94rem !important; }
  body.gattomusic-v92-call-surface #chatCallModal .chat-call-stage.video,#chatCallModal .chat-call-stage.video { min-height: 190px !important; height: min(34dvh, 330px) !important; max-height: 36dvh !important; }
  #chatCallModal .chat-call-actions .button { min-height: 36px !important; padding: 6px 8px !important; flex: 1 1 31% !important; }
}

/* Cartões de salas ativas dentro do próprio Chat. */
.chat-room-strip-v969 {
  display: grid; gap: 7px; margin: 7px 12px 2px; position: relative; z-index: 8;
}
.chat-room-strip-v969:empty { display: none; }
.chat-room-live-card-v969 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid color-mix(in srgb,var(--secondary) 46%,var(--line));
  border-radius: 14px; background: linear-gradient(135deg,color-mix(in srgb,var(--panel) 90%,var(--secondary) 10%),var(--panel));
  box-shadow: 0 8px 26px rgba(0,0,0,.13);
}
.chat-room-live-info-v969 { display: grid; gap: 2px; min-width: 0; }
.chat-room-live-info-v969 strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .94rem; }
.chat-room-live-info-v969 span { color: var(--muted); font-size: .77rem; }

/* Modal de criação/convite. */
.chat-room-create-overlay-v969,.chat-room-modal-v969 {
  position: fixed; inset: 0; z-index: 10040; display: grid; place-items: center; padding: 10px;
  background: rgba(4,9,18,.76); backdrop-filter: blur(6px);
}
.chat-room-create-dialog-v969 {
  width: min(600px,96vw); max-height: 92dvh; overflow: auto; display: grid; gap: 13px;
  padding: 20px; border: 1px solid color-mix(in srgb,var(--secondary) 45%,var(--line)); border-radius: 20px;
  background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.55);
}
.chat-room-create-dialog-v969 h2,.chat-room-create-dialog-v969 h3,.chat-room-create-dialog-v969 p { margin: 0; }
.chat-room-create-field-v969 { display: grid; gap: 6px; font-weight: 800; }
.chat-room-create-field-v969 input,.chat-room-create-field-v969 select {
  width: 100%; min-height: 42px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); color: var(--text);
}
.chat-room-contact-picker-v969 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 240px; overflow: auto; }
.chat-room-contact-choice-v969 { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.chat-room-create-actions-v969 { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Sala em grade: dimensionada inicialmente para ~6 pessoas, sem limite rígido. */
.chat-room-panel-v969 {
  width: min(1180px, calc(100vw - 16px)); max-height: calc(100dvh - 12px); overflow: auto;
  display: grid; gap: 10px; padding: clamp(12px,1.6vw,20px); border: 1px solid color-mix(in srgb,var(--secondary) 45%,var(--line));
  border-radius: 22px; background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.62);
}
.chat-room-header-v969 { text-align: center; display: grid; gap: 3px; }
.chat-room-header-v969 p,.chat-room-header-v969 h2 { margin: 0; }
.chat-room-header-v969 .eyebrow { font-size: .84rem; font-weight: 900; letter-spacing: .11em; }
.chat-room-header-v969 h2 { font-size: clamp(1.55rem,2.3vw,2.05rem); }
.chat-room-status-v969,.chat-room-clock-v969 { font: 800 .91rem/1.25 Verdana,Arial,sans-serif; color: var(--secondary); }
.chat-room-grid-v969 {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); gap: 9px;
}
.chat-room-participant-v969 {
  position: relative; min-height: clamp(160px,25dvh,270px); overflow: hidden; border-radius: 16px;
  border: 2px solid color-mix(in srgb,var(--line) 80%,transparent); background: color-mix(in srgb,var(--panel) 70%,#000 30%);
  display: grid; place-items: center; transition: border-color .18s ease,box-shadow .18s ease;
}
.chat-room-participant-v969.speaking { border-color: var(--secondary); box-shadow: 0 0 0 2px color-mix(in srgb,var(--secondary) 28%,transparent),0 10px 30px rgba(0,0,0,.22); }
.chat-room-participant-v969.connection-warning { border-color: #e7a93d; }
.chat-room-video-v969 { width: 100%; height: 100%; min-height: inherit; object-fit: cover; background: #03070d; }
.chat-room-avatar-v969 {
  width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%;
  font: 900 2.1rem/1 Verdana,Arial,sans-serif; background: color-mix(in srgb,var(--secondary) 28%,var(--panel)); border: 2px solid color-mix(in srgb,var(--secondary) 55%,transparent);
}
.chat-room-participant-footer-v969 {
  position: absolute; left: 7px; right: 7px; bottom: 7px; display: flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: 10px; background: rgba(3,8,16,.74); color: #fff; backdrop-filter: blur(5px);
}
.chat-room-participant-footer-v969 strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.chat-room-media-state-v969 { margin-left: auto; font-size: .76rem; white-space: nowrap; }
.chat-room-speaking-v969 { display: none; font-size: .68rem; font-weight: 900; color: #a8f5c5; }
.chat-room-participant-v969.speaking .chat-room-speaking-v969 { display: inline; }
.chat-room-devices-v969 { border: 1px solid var(--line); border-radius: 12px; padding: 7px 9px; }
.chat-room-devices-v969 summary { cursor: pointer; font-weight: 900; font-size: .84rem; }
.chat-room-device-grid-v969 { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 8px; padding-top: 8px; }
.chat-room-device-field-v969 { display: grid; gap: 4px; font-size: .76rem; font-weight: 800; }
.chat-room-actions-v969 { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.chat-room-actions-v969 .button { min-height: 39px; padding: 7px 11px; font-size: .82rem; }
.chat-room-privacy-v969 { margin: 0; text-align: center; color: var(--muted); font-size: .76rem; line-height: 1.35; }

body.light .chat-room-create-overlay-v969,body.light .chat-room-modal-v969 { background: rgba(226,232,240,.82); }
body.light .chat-room-participant-v969 { background: #dce3eb; }

@media (max-width: 720px) {
  .chat-room-live-card-v969 { align-items: stretch; }
  .chat-room-live-card-v969 .button { flex: 0 0 auto; }
  .chat-room-contact-picker-v969 { grid-template-columns: 1fr; }
  .chat-room-panel-v969 { width: calc(100vw - 6px); max-height: calc(100dvh - 4px); padding: 9px; gap: 7px; border-radius: 14px; }
  .chat-room-grid-v969 { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .chat-room-participant-v969 { min-height: clamp(135px,21dvh,210px); border-radius: 11px; }
  .chat-room-avatar-v969 { width: 60px; height: 60px; font-size: 1.55rem; }
  .chat-room-participant-footer-v969 { left: 4px; right: 4px; bottom: 4px; padding: 5px 6px; gap: 4px; }
  .chat-room-participant-footer-v969 strong { font-size: .7rem; }
  .chat-room-speaking-v969,.chat-room-media-state-v969 { font-size: .62rem; }
  .chat-room-actions-v969 .button { flex: 1 1 31%; min-height: 36px; padding: 6px 7px; font-size: .73rem; }
}

@media (max-width: 430px) {
  .chat-room-grid-v969 { grid-template-columns: 1fr 1fr; }
  .chat-room-participant-v969 { min-height: 130px; }
  .chat-room-strip-v969 { margin-inline: 5px; }
  .chat-room-live-card-v969 { padding: 7px; gap: 6px; }
  .chat-room-live-info-v969 strong { font-size: .82rem; }
  .chat-room-live-info-v969 span { font-size: .68rem; }
  #chatCreateRoomV969 { flex: 1 1 auto; }
}
