:root {
  --cc-bar-height: 52px;
  --cc-ink: #eaf8f6;
  --cc-muted: #9db5b2;
  --cc-panel: #071315;
  --cc-border: #294342;
  --cc-green: #2be0b8;
  --cc-blue: #48a8ff;
}

html.callchat-client body {
  padding-top: var(--cc-bar-height) !important;
  height: calc(100% - var(--cc-bar-height)) !important;
  box-sizing: content-box;
  background: #071012;
}

#callchat-command-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100000;
  height: var(--cc-bar-height);
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--cc-border);
  background: #071315;
  color: var(--cc-ink);
  font: 13px/1.2 Inter, system-ui, sans-serif;
}

.cc-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--cc-ink);
  text-decoration: none;
}

.cc-mobile-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--cc-border);
  border-radius: 6px;
  color: var(--cc-ink);
  text-decoration: none;
}

.cc-mobile-back span {
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

.cc-brand img {
  width: 34px;
  height: 34px;
}

.cc-brand span,
.cc-brand strong,
.cc-brand small {
  display: block;
  min-width: 0;
}

.cc-brand strong {
  font-size: 15px;
}

.cc-brand small {
  margin-top: 2px;
  color: var(--cc-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.cc-commands {
  display: flex;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.cc-command {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--cc-muted);
  text-decoration: none;
}

.cc-command:hover,
.cc-command:focus-visible {
  background: #122729;
  color: var(--cc-ink);
}

.cc-command span {
  color: var(--cc-green);
  font-family: ui-monospace, monospace;
  font-size: 15px;
}

.cc-posture {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cc-muted);
  white-space: nowrap;
}

.cc-posture i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cc-blue);
}

.cc-posture[data-state="included"] i {
  background: var(--cc-green);
  box-shadow: 0 0 0 3px rgba(43, 224, 184, 0.14);
}

.mx_AuthPage,
.mx_AuthBody,
.mx_AuthPage_modal {
  border-radius: 8px !important;
}

html.callchat-client .mx_AuthPage {
  height: calc(100vh - var(--cc-bar-height)) !important;
  min-height: calc(100vh - var(--cc-bar-height)) !important;
}

.mx_AuthPage_modal {
  border: 1px solid #315351 !important;
  background: rgba(7, 19, 21, 0.96) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.54) !important;
}

.mx_AuthHeaderLogo img {
  width: 68px !important;
  height: 68px !important;
  object-fit: contain;
}

.mx_DefaultWelcome_logo img {
  width: 64px !important;
  height: 64px !important;
  object-fit: contain;
}

.mx_DefaultWelcome h1 {
  margin: 20px 0 24px !important;
  color: var(--cc-ink) !important;
  font-size: 25px !important;
  line-height: 1.2 !important;
}

.mx_DefaultWelcome_buttons {
  gap: 10px !important;
}

.mx_DefaultWelcome_buttons > a {
  min-height: 42px;
  border-radius: 6px !important;
  font-weight: 750 !important;
}

.mx_DefaultWelcome_buttons > a[data-kind="primary"] {
  background: var(--cc-green) !important;
  color: #041311 !important;
}

.mx_DefaultWelcome_buttons > a[data-kind="secondary"],
.mx_DefaultWelcome_buttons > a.cc-create-account {
  border: 1px solid #315351 !important;
  background: #102426 !important;
  color: var(--cc-ink) !important;
}

.mx_AuthFooter {
  padding-bottom: 10px !important;
}

@media (max-width: 760px) {
  :root {
    --cc-bar-height: 48px;
  }

  #callchat-command-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 0 8px;
  }

  html.callchat-client,
  html.callchat-client body,
  html.callchat-client #matrixchat,
  html.callchat-client .mx_MatrixChat_wrapper,
  html.callchat-client .mx_MatrixChat {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  html.callchat-room-route .cc-brand {
    display: none;
  }

  html.callchat-room-route .cc-mobile-back {
    display: inline-flex;
  }

  html.callchat-room-route .mx_SpacePanel,
  html.callchat-room-route .mx_LeftPanel,
  html.callchat-room-route .mx_LeftPanel_outerWrapper,
  html.callchat-room-route .mx_LeftPanel_panel:has(.mx_LeftPanel_outerWrapper),
  html.callchat-room-route .mx_Separator,
  html.callchat-room-route .mx_ResizeHandle--horizontal {
    display: none !important;
  }

  html.callchat-room-route :has(> .mx_LeftPanel_panel .mx_LeftPanel_outerWrapper) {
    display: none !important;
  }

  html.callchat-room-route :has(> .mx_LeftPanel_panel .mx_RoomView_wrapper) {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  html.callchat-room-route .mx_MatrixChat > :not(.mx_SpacePanel):not(.mx_LeftPanel):not(.mx_LeftPanel_outerWrapper):not(.mx_ResizeHandle),
  html.callchat-room-route .mx_RoomView_wrapper,
  html.callchat-room-route .mx_RoomView,
  html.callchat-room-route .mx_MainSplit {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    flex-basis: 100% !important;
  }

  html.callchat-room-route .mx_RightPanel {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3000 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .mx_Dialog_wrapper,
  .mx_Dialog_border {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .mx_Dialog_border {
    padding: 8px !important;
    overflow: hidden !important;
  }

  .mx_Dialog,
  .mx_Dialog_fixedWidth,
  .mx_UserSettingsDialog,
  .mx_RoomSettingsDialog,
  .mx_SpacePreferencesDialog,
  .mx_SpaceSettingsDialog {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .mx_Dialog {
    padding: 24px 16px !important;
  }

  .mx_Dialog_content,
  .mx_Dialog_buttons,
  .mx_Dialog_buttons_row,
  .mx_Dialog button {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .mx_CompleteSecurityBody,
  .mx_CompleteSecurity_body,
  .mx_EncryptionCard,
  .mx_EncryptionCard_header,
  .mx_EncryptionCard_buttons {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
  }

  .mx_CompleteSecurityBody {
    padding: 20px 16px 32px !important;
  }

  .mx_EncryptionCard_buttons button {
    width: 100% !important;
  }

  .mx_RoomPreviewBar,
  .mx_RoomPreviewBar_message,
  .mx_RoomPreviewBar_actions,
  .mx_RoomPreviewBar_footer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
  }

  .mx_RoomPreviewBar {
    padding-inline: 16px !important;
  }

  .mx_RoomPreviewBar_actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .mx_RoomPreviewBar_actions button,
  .mx_RoomPreviewBar_actions [role="button"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .cc-brand span,
  .cc-command b,
  .cc-posture span {
    display: none;
  }

  .cc-brand img {
    width: 32px;
    height: 32px;
  }

  .cc-commands {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .cc-command {
    min-width: 38px;
    justify-content: center;
    padding: 0 8px;
  }

  .mx_AuthPage_modal {
    width: calc(100vw - 24px) !important;
    max-width: 502px !important;
  }

  .mx_Welcome,
  .mx_DefaultWelcome {
    width: 100% !important;
    max-width: 380px !important;
  }

  .mx_DefaultWelcome_logo img {
    width: 56px !important;
    height: 56px !important;
  }

  .mx_DefaultWelcome h1 {
    font-size: 22px !important;
  }
}

@media (max-height: 620px) {
  .mx_DefaultWelcome_logo img {
    width: 46px !important;
    height: 46px !important;
  }

  .mx_DefaultWelcome h1 {
    margin: 12px 0 16px !important;
    font-size: 21px !important;
  }
}
