/* ===== Estilos base e componentes reutilizáveis (botões, avatar, status, toast, interruptor) ===== */

:root {
  --raio-servidor: 16px;
}

body {
  background-color: var(--cor-fundo-geral);
  height: 100vh;
  overflow: hidden;
}

.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--cor-online);
}

.status-dot--membro {
  border: 1px solid var(--cor-sidebar-direita);
}

.status-dot--rodape {
  border: 1px solid var(--cor-cards);
}

.botao-icone {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  color: var(--cor-icones);
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.botao-icone:hover {
  background-color: var(--cor-cards);
  color: var(--cor-texto-principal);
  transform: translateY(-1px);
}

.botao-icone:active {
  transform: scale(0.92);
}

.botao-icone.ativo {
  color: var(--cor-vermelho);
}

.ponto-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cor-online);
  display: inline-block;
}

.interruptor {
  position: relative;
  width: 36px;
  height: 20px;
  display: inline-block;
  flex-shrink: 0;
}

.interruptor input {
  opacity: 0;
  width: 0;
  height: 0;
}

.interruptor__trilho {
  position: absolute;
  inset: 0;
  background-color: var(--cor-cards);
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.interruptor__trilho::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background-color: var(--cor-texto-principal);
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.interruptor input:checked + .interruptor__trilho {
  background-color: var(--cor-online);
}

.interruptor input:checked + .interruptor__trilho::before {
  transform: translateX(16px);
}

.coroa {
  font-size: 11px;
  color: var(--cor-roxo);
}

.scroll-customizada {
  position: absolute;
  top: 4px;
  right: 8px;
  bottom: 4px;
  width: 8px;
}

.scroll-customizada.escondido {
  display: none;
}

.scroll-customizada__barra {
  position: absolute;
  left: 0;
  width: 100%;
  height: 120px;
  border-radius: 999px;
  background-color: #2A3142;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.scroll-customizada__barra:hover,
.scroll-customizada__barra.arrastando {
  background-color: #37405A;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.modal-overlay.escondido {
  display: none;
}

/* A confirmação precisa ficar na frente de tudo (perfil, configurações, editores). */
#modalConfirmar {
  z-index: 600;
}

.botao-modal {
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.botao-modal--cancelar {
  background: none;
  color: var(--cor-texto-principal);
}

.botao-modal--cancelar:hover {
  text-decoration: underline;
}

.botao-modal--criar {
  background-color: var(--cor-roxo);
  color: #fff;
}

.botao-modal--criar:hover {
  opacity: 0.9;
}

.botao-modal--criar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.botao-modal--perigo {
  background-color: var(--cor-vermelho);
  color: #fff;
}

.botao-modal--perigo:hover {
  opacity: 0.9;
}

.pontinho-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.texto-status--online {
  color: #B5BAC1;
}

.texto-status--ausente {
  color: var(--cor-ausente);
}

.texto-status--ocupado {
  color: var(--cor-vermelho);
}

.texto-status--offline {
  color: var(--cor-icones);
}

.interruptor--pequeno {
  width: 28px;
  height: 16px;
}

.interruptor--pequeno .interruptor__trilho::before {
  width: 10px;
  height: 10px;
  top: 3px;
  left: 3px;
}

.interruptor--pequeno input:checked + .interruptor__trilho::before {
  transform: translateX(12px);
}

body.esconder-mutados .canal--mutado {
  display: none;
}
.tela-auth {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cor-bg);
}

.ponto-offline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cor-icones);
  display: inline-block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  background-color: rgba(30, 35, 44, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), var(--glass-highlight);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast i {
  font-size: 18px;
  color: var(--cor-online);
  flex-shrink: 0;
}

:root {
  --cor-ausente: #E0A526;
}

.avatar-wrap--inicio,
.avatar-wrap--inicio img,
.avatar-inicial {
  width: 40px;
  height: 40px;
}

.avatar-wrap--inicio img,
.avatar-inicial {
  border-radius: 50%;
  object-fit: cover;
}

.avatar-inicial {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.status-dot--inicio {
  width: 14px;
  height: 14px;
  right: -2px;
  bottom: -2px;
  border: 3px solid var(--cor-fundo-geral);
}

.status-dot--online {
  background-color: var(--cor-online);
}

.status-dot--ausente {
  background-color: var(--cor-ausente);
}

.status-dot--ocupado {
  background-color: var(--cor-vermelho);
}

.status-dot--offline {
  background-color: var(--cor-icones);
}

.status-dot.status-dot--ausente,
.status-dot.status-dot--ocupado,
.status-dot.status-dot--offline {
  container-type: size;
  overflow: hidden;
  background-clip: padding-box;
}

.status-dot.status-dot--ausente::after,
.status-dot.status-dot--ocupado::after,
.status-dot.status-dot--offline::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: inherit;
}

.status-dot.status-dot--ausente::after {
  border-width: 42cqw;
  border-radius: 50%;
  left: 33cqw;
  top: -17cqw;
}

.status-dot.status-dot--ocupado::after {
  border-width: 13cqw 30cqw;
  border-radius: 999px;
  left: 20cqw;
  top: 37cqw;
}

.status-dot.status-dot--offline::after {
  border-width: 25cqw;
  border-radius: 50%;
  left: 25cqw;
  top: 25cqw;
}

.pontinho-status.status-dot--ausente {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Ccircle cx='75' cy='25' r='42' fill='black'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='50' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Ccircle cx='75' cy='25' r='42' fill='black'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='50' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.pontinho-status.status-dot--ocupado {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Crect x='20' y='37' width='60' height='26' rx='13' fill='black'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='50' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Crect x='20' y='37' width='60' height='26' rx='13' fill='black'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='50' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.pontinho-status.status-dot--offline {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Ccircle cx='50' cy='50' r='25' fill='black'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='50' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Ccircle cx='50' cy='50' r='25' fill='black'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='50' mask='url(%23m)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}