/* LoadMask */
.loadmask-container {
  background-color: rgb(255, 255, 255, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 100;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loadmask-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #d84a38;
  animation: loadmask-spin 0.5s linear infinite;
}

@keyframes loadmask-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* LoadMask Ends */

/* Bayun Admin Container */
.bayun-admin-container {
  padding: 0 10%;
}

#bayun-admin-wrapper {
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

.highlight {
  background-color: #eee;
  font-size: 1.2em;
  margin: 0 0 30px 0;
  padding: 0.2em 1.5em;
}

.warning {
  color: red;
  font-weight: 400;
}

@media screen and (min-width: 1000px) {
  /* hack! to detect non-touch devices */
  div#links a {
    line-height: 0.8em;
  }
}

audio {
  max-width: 100%;
}

body {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  margin: 0;
  padding: 1em;
  word-break: break-word;
}

.webrtc-button {
  background-color: #d84a38;
  border: none;
  border-radius: 2px;
  color: white;
  font-family: "Roboto", sans-serif;
  font-size: 0.8em;
  /* margin: 0 0 1em 0; */
  padding: 0.5em 0.7em 0.6em 0.7em;
  text-transform: uppercase;
  font-weight: bold;
}

.webrtc-button:active {
  background-color: #cf402f;
}

.webrtc-button:hover {
  background-color: #cf402f;
}

.webrtc-button[disabled] {
  color: #ccc;
}

.webrtc-button[disabled]:hover {
  background-color: #d84a38;
}

canvas {
  background-color: #ccc;
  max-width: 100%;
  width: 100%;
}

code {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
}

div#container {
  margin: 0 auto 0 auto;
  max-width: 60em;
  padding: 1em 1.5em 1.3em 1.5em;
}

div#links {
  padding: 0.5em 0 0 0;
}

h1 {
  /* border-bottom: 1px solid #ccc; */
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  margin: 0 0 0.8em 0;
  padding: 0 0 0.2em 0;
}

h2 {
  color: #444;
  font-weight: 500;
}

h3 {
  /* border-top: 1px solid #eee; */
  color: #666;
  font-weight: 500;
  margin: 10px 0 10px 0;
  white-space: nowrap;
}

li {
  margin: 0 0 0.4em 0;
}

html {
  /* avoid annoying page width change
  when moving from the home page */
  overflow-y: scroll;
}

img {
  border: none;
  max-width: 100%;
}

input[type="radio"] {
  position: relative;
  top: -1px;
}

p {
  color: #444;
  font-weight: 300;
}

p#data {
  border-top: 1px dotted #666;
  font-family:
    Courier New,
    monospace;
  line-height: 1.3em;
  max-height: 1000px;
  overflow-y: auto;
  padding: 1em 0 0 0;
}

p.borderBelow {
  border-bottom: 1px solid #aaa;
  padding: 0 0 20px 0;
}

section p:last-of-type {
  margin: 0;
}

section {
  border-bottom: 1px solid #eee;
  margin: 0 0 30px 0;
  padding: 0 0 20px 0;
}

section:last-of-type {
  border-bottom: none;
  padding: 0 0 1em 0;
}

select {
  margin: 0 1em 1em 0;
  position: relative;
  top: -1px;
}

h1 span {
  white-space: nowrap;
}

a {
  color: #6fa8dc;
  font-weight: 300;
  text-decoration: none;
}

h1 a {
  font-weight: 300;
  margin: 0 10px 0 0;
  white-space: nowrap;
}

a:hover {
  color: #3d85c6;
  text-decoration: underline;
}

a#viewSource {
  display: block;
  margin: 1.3em 0 0 0;
  border-top: 1px solid #999;
  padding: 1em 0 0 0;
}

div#errorMsg p {
  color: #f00;
}

div#links a {
  display: block;
  line-height: 1.3em;
  margin: 0 0 1.5em 0;
}

div.outputSelector {
  margin: -1.3em 0 2em 0;
}

p.description {
  margin: 0 0 0.5em 0;
}

strong {
  font-weight: 500;
}

textarea {
  resize: none;
  font-family: "Roboto", sans-serif;
}

ul {
  margin: 0 0 0.5em 0;
}

@media screen and (max-width: 650px) {
  .highlight {
    font-size: 1em;
    margin: 0 0 20px 0;
    padding: 0.2em 1em;
  }

  h1 {
    font-size: 24px;
  }
}

@media screen and (max-width: 550px) {
  .webrtc-button:active {
    background-color: darkRed;
  }

  h1 {
    font-size: 22px;
  }
}

@media screen and (max-width: 450px) {
  h1 {
    font-size: 20px;
  }
}

.webrtc-button {
  cursor: pointer;
}

.webrtc-button#leave-meeting {
  background-color: red;
}

div#buttons {
  margin: 0 0 20px 0;
}

div#status {
  height: 2em;
  margin: 1em 0 0 0;
}

input#audio {
  margin: 0 0.5em 0 0;
  position: relative;
  top: -1px;
}

video {
  --width: 20%;
  width: 100%;
  height: calc(var(--width) * 0.75);
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg); /* Safari and Chrome */
  -moz-transform: rotateY(180deg); /* Firefox */
  margin-bottom: 10px;
}

.peer-video-container,
.my-video-container {
  display: inline-block;
  width: 20%;
  text-align: center;
  margin-right: 20px;
}

.peer-video {
  float: left;
  /* background-image: url("/images/static.gif"); */
}

.popup {
  position: absolute;
  right: 0;
  top: 40px;
  font-weight: normal;
  background: #ccc;
  font-size: 12px;
  box-shadow: 1px 1px 5px;
  padding: 10px;
  border-radius: 5px;
}

input.meeting-options {
  border: none;
  border-radius: 2px;
  color: white;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  margin: 5px;
  padding: 5px;
  cursor: pointer;
  float: right;
}

input#leave-meeting {
  background-color: #d84a38;
}

input#leave-meeting:hover {
  background-color: #cf402f;
}

input#add-member {
  background-color: #ccc;
  color: #000;
}

input#add-member:hover {
  background-color: #c1c1c1;
}

.popup div {
  padding: 10px 0;
}

#login-box .popup div,
#register-container .popup div {
  padding: 10px 0;
}

#login-box #login-explicit-org-member-section {
  padding-bottom: 0;
  padding-top: 0;
}
#login-box #login-explicit-org-member-section #login-explicit-fields {
  padding-bottom: 0;
  padding-top: 0;
}

#register-container #register-explicit-org-member-section {
  padding-bottom: 0;
  padding-top: 0;
}
#register-container
  #register-explicit-org-member-section
  #register-explicit-fields {
  padding-bottom: 0;
  padding-top: 0;
}

#add-member-explicit-org-member-section {
  padding-bottom: 0;
  padding-top: 0;
}
#add-member-explicit-org-member-section #add-member-explicit-fields {
  padding-bottom: 0;
  padding-top: 0;
}

.close-popup {
  background-color: unset;
  color: #000;
  float: right;
  width: unset;
  min-width: unset;
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
}

.close-popup:hover {
  background-color: unset;
}

#add-member-button {
  margin: 10px 0;
}

.auth-card,
div.login-container {
  text-align: left;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  padding: 28px 24px 24px;
  margin: 24px auto 0;
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  background: #fff;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.06);
}

div.login-container.auth-card {
  text-align: left;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 0;
}

.auth-title {
  margin: 0;
  color: #2c3e50;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.auth-field {
  margin-bottom: 12px;
  padding: 0;
}

.auth-field:last-child {
  margin-bottom: 0;
}

.auth-input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  background-color: #fafbfc;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.auth-input::placeholder {
  color: #98a2b3;
}

.auth-input:hover {
  border-color: #b8c0cc;
  background-color: #fff;
}

.auth-input:focus {
  outline: none;
  border-color: #d84a38;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(216, 74, 56, 0.12);
}

.auth-input:disabled {
  background-color: #f2f4f7;
  color: #98a2b3;
  cursor: not-allowed;
}

.auth-section {
  margin-bottom: 12px;
  padding: 0;
}

.auth-nested-fields {
  margin-top: 8px;
  padding: 0;
}

.auth-nested-fields .auth-field {
  margin-bottom: 10px;
}

.auth-options {
  margin: 4px 0 16px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  text-align: left;
}

.auth-checkbox:first-child {
  padding-top: 0;
}

.auth-checkbox:last-child {
  padding-bottom: 0;
}

.auth-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #d84a38;
  cursor: pointer;
}

.auth-checkbox label {
  font-size: 13px;
  color: #4a5568;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}

.auth-actions {
  margin-top: 4px;
  padding: 0;
}

.auth-remember {
  justify-content: center;
  margin-top: 12px;
  padding: 0;
}

.auth-footer {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #eef0f3;
  text-align: center;
}

.auth-primary-btn {
  width: 100%;
  height: 42px;
  margin: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.auth-primary-btn:active {
  transform: scale(0.99);
}

.auth-footer .auth-link-btn,
div.login-container .auth-link-btn {
  width: auto;
  height: auto;
  min-height: unset;
  padding: 4px 8px;
  font-size: 13px;
  color: #d84a38;
  text-decoration: none;
  background: transparent;
  text-transform: none;
  font-weight: 400;
}

.auth-footer .auth-link-btn:hover,
div.login-container .auth-link-btn:hover {
  background: transparent;
  color: #b53d2e;
  text-decoration: underline;
}

.auth-footer .auth-link-btn:active,
div.login-container .auth-link-btn:active {
  background: transparent;
}

@media screen and (max-width: 450px) {
  .auth-card,
  div.login-container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 22px 18px 20px;
    border-radius: 10px;
  }

  .auth-title {
    font-size: 1.2rem;
  }

  .guest-join-row {
    gap: 8px;
  }

  .guest-join-btn {
    min-width: 68px;
    padding: 0 14px;
  }
}

.auth-back-btn,
div.login-container .auth-back-btn {
  font-size: 13px;
  color: #667085;
  padding: 0;
  margin-bottom: 4px;
  background: transparent;
  text-decoration: none;
  text-transform: lowercase;
}

.auth-back-btn:hover,
div.login-container .auth-back-btn:hover {
  color: #d84a38;
  background: transparent;
  text-decoration: none;
}

div.login-container .webrtc-button.auth-primary-btn {
  width: 100%;
  height: 42px;
}

div.login-container input.auth-input {
  width: 100%;
  height: 40px;
}

div#guest-container.guest-card {
  margin-top: 20px;
}

.guest-join-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.guest-room-field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.guest-join-btn {
  width: auto;
  min-width: 76px;
  height: 40px;
  flex-shrink: 0;
  margin: 0;
  padding: 0 18px;
}

#room-input {
  height: 25px;
}

#join-button {
  height: 30px;
}

/* Link Button Start */
.link {
  background-color: white;
  color: black;
  text-decoration: underline;
  min-width: fit-content;
  width: fit-content;
  padding: 0;
  margin: 0;
  text-transform: unset;
  font-weight: 400;
  font-size: 16px;
}

.link:hover {
  background-color: white;
  color: blue;
}

.link:active {
  background-color: white;
}

.webrtc-button[disabled].link:hover {
  background-color: unset;
  color: #ccc;
}

/* Link Button End */

/* Back Button */
.back-button {
  font-weight: 400;
  text-transform: lowercase;
}

.back-button i {
  font-size: 12px;
  padding: 0 6px;
}

div.back-button-container {
  text-align: left;
  margin: -8px 0 8px;
  padding: 0;
}

div.back-button-container .webrtc-button,
div.change-org-name-button-container .webrtc-button {
  width: fit-content;
}

div.change-org-name-button-container {
  text-align: right;
  padding: 0 !important;
  position: relative;
}

div.change-org-name-button-container .webrtc-button {
  width: fit-content;
  text-decoration: unset;
}

div#change-org-name-popup {
  background-color: #eee;
  top: 30px;
}

div#change-org-name-popup div {
  margin: 0 20px;
}

div#change-org-name-popup input {
  margin-bottom: 10px;
}

#change-org-name-button:hover {
  text-decoration: underline;
  color: unset;
}

#add-member-popup input {
  min-width: 250px;
}

#add-member-popup input[type="checkbox"] {
  min-width: unset;
}

.heading-container {
  display: flex;
}

.heading-container > div:first-child {
  flex: 9;
}

.heading-container #room-id {
  font-weight: 400;
  font-size: 24px;
}

.heading-container .user-info-container {
  flex: 3;
}

.heading-container #user-info {
  float: right;
  font-weight: 400;
  text-align: right;
  font-size: 20px;
}

.passcode-container {
  position: relative;
  padding: 0;
}

.passcode-container .auth-input {
  padding-right: 40px;
}

.show-passcode {
  position: absolute;
  right: 12px;
  top: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 15px;
  color: #98a2b3;
  transition: color 0.2s ease;
}

.show-passcode:hover {
  color: #d84a38;
}

.instructions {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgb(0, 0, 0, 0.3);
  z-index: 100;
}

.instructions .content {
  position: absolute;
  background-color: #fff;
  padding: 10px;
  width: 75%;
  min-width: 300px;
  min-height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 5px;
}

.instructions .content .main {
  margin-bottom: 30px;
}

.close-instructions {
  height: 30px;
}

div.instructions-link {
  margin: 20px 0;
  text-align: center;
}

.banner {
  text-align: center;
  margin: 20px;
  font-weight: 400;
  font-size: 20px;
}

div.agentic-member-option input,
div.keep-loggedIn input,
div.use-passcode input {
  width: 16px;
}

div.agentic-member-option label,
div.agentic-member-option input,
div.keep-loggedIn label,
div.keep-loggedIn input,
div.use-passcode label,
div.use-passcode input {
  vertical-align: middle;
  position: relative;
}

.bayun-dropdown {
  margin: 20px 10px 0 0;
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.bayun-dropdown:hover {
  border-color: #888;
}

.bayun-dropdown:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 4px rgba(25, 118, 210, 0.5);
}

/* Meeting Controls Styling */
.meeting-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.meeting-controls .webrtc-button,
.meeting-controls select {
  margin: 0;
  padding: 10px 16px;
  min-width: 150px;
  height: 40px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.meeting-controls .webrtc-button {
  background-color: #d84a38;
  border: none;
  color: white;
  text-transform: uppercase;
}

.meeting-controls .webrtc-button:hover {
  background-color: #cf402f;
}

.meeting-controls select {
  background-color: #fff;
  border: 1px solid #ccc;
  color: #333;
}

.meeting-controls select:hover {
  border-color: #888;
}

.meeting-controls select:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 4px rgba(25, 118, 210, 0.5);
}

/* FAB and Modal Styles (moved from index.html) */
.fab-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
}
.fab-container.hidden {
  display: none;
}
.fab {
  display: inline-block;
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 28px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.fab:active {
  transform: scale(0.98);
}
.fab-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0s linear 0.2s;
}
.fab-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.2s ease,
    visibility 0s linear 0s;
}
.fab-modal-content {
  width: 85vw;
  height: 85vh;
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  border-radius: 8px;
  resize: both;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
  transform: scale(0.94) translateY(18px);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.34, 1.15, 0.64, 1),
    opacity 0.32s ease;
  transition-delay: 0s;
}
.fab-modal.show .fab-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.06s;
}
@media (prefers-reduced-motion: reduce) {
  .fab-modal {
    transition:
      opacity 0.12s ease,
      visibility 0s linear 0.12s;
  }
  .fab-modal.show {
    transition:
      opacity 0.12s ease,
      visibility 0s linear 0s;
  }
  .fab-modal-content {
    transform: none;
    transition: opacity 0.12s ease;
  }
  .fab-modal.show .fab-modal-content {
    transition-delay: 0s;
  }
}

.fab-modal-sidebar {
  width: 10%;
  min-width: 130px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 16px 12px 16px;
  background: #ffffff;
  box-sizing: border-box;
  border-right: 1px solid #e6e6e6;
}
.fab-modal-close {
  width: 30px;
  margin: auto;
  border-radius: 6px;
}

.fab-modal-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 0 0 0;
  scrollbar-width: thin;
  width: 100%;
}
.fab-modal-nav::-webkit-scrollbar {
  width: 6px;
}
.fab-modal-nav::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.fab-modal-nav::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}
.fab-modal-nav-item {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  padding: 2px 2px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
  white-space: normal;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
}
.fab-modal-nav-item:hover {
  background-color: #f5f5f5;
}
.fab-modal-nav-item.active {
  background-color: #e3f2fd;
  border-color: #1976d2;
  color: #1976d2;
}
.fab-modal-nav-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.fab-modal-nav-item-label {
  flex-shrink: 0;
  font-size: smaller;
}
.fab-modal-body {
  width: 80%;
  flex: 1;
  overflow: auto;
  padding: 0;
  background: #ffffff;
  margin: 0;
}
