/* Shared room layouts: retain each product's existing palette and controls. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
}
body {
  line-height: 1.5 !important;
}
img,
video,
canvas,
iframe {
  max-width: 100%;
}
input,
select,
textarea,
.input-group,
.container,
.row > * {
  min-width: 0;
}
button,
input[type="submit"],
select {
  min-height: 44px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #7f8dc2;
  outline-offset: 3px;
}
select:not([multiple]) {
  padding-right: 2.5rem !important;
}
#initialScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 100dvh;
}
#initialScreen.hidden {
  /* The conference hide() helper uses a class, not an inline display style.
   * Its lower-specificity .hidden rule must not lose to the layout above. */
  display: none;
}
#initialScreen p {
  position: static;
  height: auto;
  line-height: 1.5;
  max-width: 100%;
  color: var(--white, #fff);
  overflow-wrap: anywhere;
}
#greenRoom,
#simpleRoom,
#protectedRoom {
  max-width: 100%;
  overflow-y: auto;
  max-height: 100dvh;
}
#greenRoom .container,
#simpleRoom .container,
#protectedRoom .container {
  max-width: 64rem;
}
#initVideo {
  width: 100%;
  height: auto;
  max-height: 55dvh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
#mediaPermissionNotice {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border: 1px solid #b9bdd1;
  border-radius: 0.5rem;
  line-height: 1.5;
}
#actionButtons,
.videoMenuBar {
  max-width: 100%;
  flex-wrap: wrap;
  gap: 0.4rem;
}
#actionButtons button {
  min-width: 44px;
  min-height: 44px;
}
#chatRoom {
  max-width: calc(100vw - 1rem);
}
.modal-dialog,
.modal {
  max-width: 100%;
}
.modal-content {
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
/* The legacy widget is positioned/sized by JavaScript for a desktop popup. */
.screen-wd {
  max-width: 100vw;
}
.screen-wd-bg {
  max-width: 100%;
}
.wd-loading-screen p {
  height: auto;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@media (max-width: 767.98px) {
  #greenRoom main,
  #simpleRoom main,
  #protectedRoom main {
    padding: 1rem 0 !important;
    min-width: 0 !important;
    align-items: flex-start !important;
  }
  #greenRoom .row,
  #simpleRoom .row,
  #protectedRoom .row {
    margin: 0;
    width: 100%;
  }
  #greenRoom .card-body,
  #simpleRoom .card-body,
  #protectedRoom .card-body {
    padding: 0.75rem;
    height: auto !important;
  }
  #greenRoom .left-border {
    border-left: 0;
  }
  .form-control,
  input,
  select,
  textarea {
    font-size: 16px;
    max-width: 100%;
  }
  .videoContainerElement {
    min-width: 0;
    width: 100%;
  }
  #videoMediaContainer,
  #contentMediaContainer {
    max-width: 100%;
  }
  #actionButtons {
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    padding: 0.35rem;
    width: 100%;
    justify-content: center;
  }
  #chatRoom {
    width: calc(100vw - 1rem) !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    max-height: 75dvh;
  }
  #settings,
  #participants,
  #settingsPanel,
  #chatContainer {
    max-width: 100vw;
  }
  .modal-dialog {
    margin: 0.5rem;
  }
  .modal-content {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #greenRoom main .container,
  #simpleRoom main .container,
  #protectedRoom main .container {
    max-width: calc(100vw - 1rem) !important;
  }
  .screen-wd {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
  }
  .screen-wd-bg {
    width: 100% !important;
    height: 100dvh !important;
    overflow-y: auto;
  }
  .wd-video-box {
    width: 100%;
    position: relative;
    top: auto;
    bottom: auto;
    float: none;
    min-height: 44dvh;
  }
  .wd-video-box video,
  .wd-video-box canvas {
    width: 100%;
    max-height: 44dvh;
    object-fit: contain;
  }
  .wd-chat-box {
    width: 100%;
    position: relative;
    inset: auto;
    min-height: 40dvh;
    margin: 0;
  }
  .big-chat-box {
    width: 100% !important;
  }
  .login-wd,
  .login-wd-bg {
    width: calc(100vw - 1rem) !important;
    max-width: 100%;
    left: 0.5rem !important;
    margin-inline: 0;
  }
  .login-wd {
    max-height: 90dvh;
    overflow-y: auto;
  }
  .sky-form .col-6 {
    width: 100%;
  }
  #videoPreview {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }
  .divGenerate table {
    width: 100% !important;
  }
  .divGenerate tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .divGenerate td {
    min-width: 0;
    padding: 0.4rem;
  }
  .divGenerate input,
  .divGenerate select {
    width: 100%;
  }
  .divGenerate .generateButton {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin: 0.25rem;
  }
  .wd-video-c {
    min-height: 44px;
    height: auto;
  }
  .wd-video-c a {
    min-height: 44px;
    min-width: 44px;
  }
  .control-ss {
    left: 0.5rem;
    max-width: calc(100vw - 1rem);
    height: auto;
    max-height: 65dvh;
    overflow-y: auto;
  }
  .modal-body {
    overflow-wrap: anywhere;
  }
  #languageMenuBar {
    max-width: calc(100vw - 1rem);
  }
  #languageMenuBar select {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader__dot {
    animation: none;
  }
}
