
:root {
  --color-primary: #00aca6;
  --color-primary-shade: #089792;
  --color-primary-tint: #42e9e3;
  --color-secondary: #592c82;
  --color-secondary-shade: #4e2970;
  --color-secondary-tint: #916ab3;
  --color-tertiary: #3bb4e5;
  --color-tertiary-shade: #207fa5;
  --color-tertiary-tint: #78cff1;
  --color-success: #10dc60;
  --color-success-shade: #0ec254;
  --color-success-tint: #28e070;
  --color-warning: #ffce00;
  --color-warning-shade: #e0b500;
  --color-warning-tint: #ffd31a;
  --color-danger: #fe0000;
  --color-danger-shade: #a30d0d;
  --color-danger-tint: #f81b1b;
  --color-dark: #222428;
  --color-dark-shade: #1e2023;
  --color-dark-tint: #383a3e;
  --color-medium: #b8b8b8;
  --color-medium-shade: #797979;
  --color-medium-tint: #f4efef;
  --color-light: #efefef;
  --color-light-shade: #efefef;
  --color-light-tint: #f5f6f9;
  --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #dc3545;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  font-family: var(--font-family-sans-serif);
}

/* #region Global */

.img-circle {
  width: 150px;
  /* Largura do círculo */
  height: 150px;
  /* Altura do círculo */
  border-radius: 50%;
  /* Faz o círculo */
  background-color: white;
  /* Cor de fundo branca */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* Garante que a imagem fique dentro do círculo */
  margin: 30px auto;
}

.img-circle img {
  width: 80%;
  height: auto;
}

/* #endregion Global */


/* #region invalid.html */

.invalid-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  text-align: center;
  background-color: var(--color-secondary);
  color: var(--white);
}

.invalid-bg h4 {
  color: #ac96c1;
  font-weight: 500;
}

/* #endregion invalid.html */


/* #region index.html */

.index {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  text-align: center;
  background-color: var(--color-secondary);
}


.index p, ul {
  color: var(--color-medium-shade);
  font-size: medium;
}

.index ul {
  text-align: left;
  list-style-type: square
}

.index-box {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  text-align: center;
  background-color: white;
  border-radius: 10px;
  color: var(--color-secondary)
}

.index-img {
  width: 50%;
  margin: 0px auto;
}

.index-btn {
  background-color: var(--color-secondary);
  color: var(--white);
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  font-size: medium;
  cursor: pointer;
}

/* #endregion index.html */


/* #region video.html */

.video-body {
  display: flex;
  height: 100vh;
  min-height: 50vh;
  margin: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--color-secondary);
}

.video-content {
  display: flex;
  flex: 1;
  width: 100%;
}


.video-midia {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.video-container {
  display: grid;
  gap: 10px;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(2, 1fr); /* 2 colunas */
  grid-template-rows: repeat(1, 1fr); /* 2 linhas */
  justify-items: center;
  align-items: center;
  max-width: 1024px; /* Limita a largura do grid */
  max-height: 900px; /* Limita a altura do grid */
  margin: auto;           
}

.video-vid {
  width: 100%;
  aspect-ratio: 4 / 3; /* Proporção 4x3 */
  object-fit: cover; /* Preencher o container sem distorção */
  border: 2px solid #333;
  border-radius: 8px;
  background-color: #000;
}

.video-settings {
  background-color: #526b7a;
  border: none;
  color: white;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 2px 2px;
  cursor: pointer;
}

/* Divisão em 50% */
.video-left {
  flex: 3;
  background-color: #f5f5f5;
  min-width: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.video-right {
  flex: 1;
  flex-basis: 35%;
  background-color: white;
  min-width: 350px;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;            
}

.video-controllers {
  /* flex: 1; */
  width: 100%;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-control-bar {
  display: flex;
  gap: 20px;
  background-color: black;
  border-radius: 50px;
  /* Borda arredondada */
  border: 15px solid black;
  justify-content: center;

}

.video-control-bar button {
  background-color: #f8fafb;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: black;
  font-size: 24px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.video-control-bar button:hover {
  background-color: #526b7a;
}

.video-control-bar .end-call {
  background-color: red;
}

.video-control-bar .end-call:hover {
  background-color: darkred;
}
/* #endregion video.html */

/* #region videolink.html */

.videolink-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  text-align: center;
  background-color: var(--color-secondary);
  color: var(--white);
}

.videolink-bg h4 {
  color: #ac96c1;
  font-weight: 500;
}

/* #endregion videolink.html */

/* The grid that contains it all */

/* #region old */

.container {
  display: grid;
  min-width: 1250px;
  height: 100%;
  grid-template-areas: "infobox infobox infobox"
    "userlistbox chatbox camerabox"
    "empty-container chat-controls chat-controls";
  grid-template-columns: 10em 1fr 500px;
  grid-template-rows: 16em 1fr 5em;
  grid-gap: 1rem;
}

.infobox {
  grid-area: infobox;
  overflow: auto;
}

.userlistbox {
  grid-area: userlistbox;
  border: 1px solid black;
  margin: 0;
  padding: 1px;
  list-style: none;
  line-height: 1.1;
  overflow-y: auto;
  overflow-x: hidden;
}

.userlistbox li {
  cursor: pointer;
  padding: 1px;
}

.chatbox {
  grid-area: chatbox;
  border: 1px solid black;
  margin: 0;
  overflow-y: scroll;
  padding: 1px;
  padding: 0.1rem 0.5rem;
}

.camerabox {
  grid-area: camerabox;
  width: 500px;
  height: 375px;
  border: 1px solid black;
  vertical-align: top;
  display: block;
  position: relative;
  overflow: auto;
}

#received_video {
  width: 100%;
  height: 100%;
  position: absolute;
}

/* The small "preview" view of your camera */
#local_video {
  width: 120px;
  height: 90px;
  position: absolute;
  top: 1rem;
  left: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 4px black;
}

/* The "Hang up" button */
#hangup-button {
  display: block;
  width: 80px;
  height: 24px;
  border-radius: 8px;
  position: relative;
  margin: auto;
  top: calc(100% - 40px);
  background-color: rgba(150, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0px 0px 1px 2px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-family: "Lucida Grande", "Arial", sans-serif;
  color: rgba(255, 255, 255, 1.0);
  cursor: pointer;
}

#hangup-button:hover {
  filter: brightness(150%);
  -webkit-filter: brightness(150%);
}

#hangup-button:disabled {
  filter: grayscale(50%);
  -webkit-filter: grayscale(50%);
  cursor: default;
}

.empty-container {
  grid-area: empty-container;
}

.chat-controls {
  grid-area: chat-controls;
  width: 100%;
  height: 100%;
}

.device-error {
  font-size: 1.1em;         /* fonte 10% maior */
  font-weight: bold;        /* negrito */
  color: #dc3545;           /* vermelho alerta */
  margin-top: 10px;         /* espaço acima */
  line-height: 1.3;         /* melhor legibilidade */
}

/* Mantém a cor de fundo roxa e centraliza a box */
.index {
  display: flex;
  justify-content: center;  
  align-items: center;
  min-height: 50vh;
  background-color: var(--color-secondary);
  margin: 0;
  padding: 0;
}

.index-box {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border-radius: 10px;
  background-color: #fff;
  color: var(--color-secondary);

  /* Tudo que estiver dentro da box fica à esquerda */
  text-align: left;
}

/* Logo centralizado */
.index-img {
  text-align: center;
  margin-bottom: 20px;
}

/* Ajusta margens para headings, parágrafos, listas */
.index-box h3,
.index-box p,
.index-box ul,
.index-box h5 {
  margin: 0 0 15px;
}

.index-box ul {
  margin-left: 20px;
  list-style-type: disc; /* ou square, se preferir */
  color: var(--color-medium-shade);
}

/* Botão centralizado */
.index-btn {
  display: block;
  margin: 0 auto;
  background-color: var(--color-secondary);
  color: #fff;
  padding: 10px 20px;
  font-size: medium;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  margin-top: 30px;
}

.error-heading svg {
  position: relative;
}

.error-paragraph {
  color: #333;
  line-height: 1.4;
  margin-bottom: 15px;
}

.error-paragraph strong {
  font-weight: 600;     /* destaca o texto “Verifique se as permissões...” */
}

.error-separator {
  border: none;
  border-top: 1px solid #ccc;
  margin: 10px 0;
}

#deviceMessage {
  align-content: center;
  text-align: center;
}

/* Caso queira destacar o <h5 id="deviceMessage"> em caso de erro */
.device-error {
  color: #dc3545;
  font-weight: bold;
}

/* Exemplo de estilo “alert” para o bloco de erro */
.error-block {
  background-color: #ffe8e6;  /* tom rosado claro de fundo */
  border: 1px solid #f5c2c2;  /* borda suave em tom rosado */
  padding: 2px 16px 6px 16px;
  border-radius: 6px;         /* cantos levemente arredondados */
  margin-bottom: 20px;        /* espaço abaixo do bloco */

}

/* Título em vermelho mais vivo */
.error-heading {
  display: flex;            /* faz ícone e texto ficarem em linha */
  align-items: flex-start;  /* alinha o topo do ícone com o topo do texto */
  gap: 8px;                 /* espaço horizontal entre ícone e texto */
  color: #b93030;           /* deixa o texto do <h3> em vermelho */
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 8px;
}

/* Parágrafo (preto) */
.error-heading-text p {
  color: #333;
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

/* Parágrafo (preto) */
.error-heading-text p {
  color: #333;
  margin: 0;
  line-height: 1.4;
}

/* Parágrafo com texto escuro */
.error-paragraph {
  color: #333;
  line-height: 1.4;
  margin-bottom: 0;
}

/* Se quiser dar destaque ao texto em <strong> */
.error-paragraph strong {
  font-weight: 600;
}

/* Caso não precise mais do <hr> */
.error-separator {
  display: none; 
}

/* #endregion old */

@media (max-width: 600px) {
  .invalid-circle {
    width: 120px;
    height: 120px;
  }

  h3 {
    font-size: 1.2em;
  }

  h4 {
    font-size: 1em;
  }
}