body,html {
    height: 100%;
    margin: 0;
    padding: 0
}
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

footer,header {
    position: fixed;
    width: 100%;
    z-index: 100
}

header {
    top: 0;
}

footer {
    bottom: 0;
}


.top-bar {
    border-bottom: 1px solid #2C2C2C;
    background-color: #212121;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 10;
    position: relative;
}

.logo-container .logo {
    height: 36px
}

.menu-toggle,.side-nav {
    display: flex;
    flex-direction: column
}

.menu-toggle {
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer
}

.menu-toggle .bar {
    background-color: #fff;
    height: 4px;
    border-radius: 2px
}

.side-nav {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #000;
    z-index: 999;
    transition: left .3s ease
}

.side-nav .close-btn {
    position: absolute;
    top: 0;
    right: 20px;
    font-size: 30px;
    background: 0 0;
    border: 0;
    color: #fff;
    cursor: pointer
}

.side-nav-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px
}

.menu-list li {
    padding: 10px 20px
}

.menu-list li a {
    color: #fff;
    text-decoration: none;
    display: block
}

.menu-list li a:hover {
    color: #3763e7
}




.side-nav-header,.side-nav-logo {
    border-bottom: 1px solid rgba(255,255,255,.1)
}

.side-nav-logo {
    text-align: center;
    padding: 20px 0
}

.side-nav-header {
    justify-content: space-between;
    padding: 10px 20px
}

.logo-inside-menu {
    max-height: 40px;
    width: auto
}

.close-btn {
    font-size: 24px;
    background: 0 0;
    color: #fff;
    border: 0;
    cursor: pointer;
    padding: 0 10px
}

.menu-list {
    list-style: none;
    padding: 20px 0 0;
    margin: 0
}


.profile-picture-container {
    text-align: center;
    margin: 20px 0
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc
}




.menu-list a {
  text-decoration: none;
  color: #fff;
  display: block;
  padding: 0.5rem 0;
}

.menu-list ul li a {
  font-size: 0.9rem;
  color: #ccc;
}

/* Menú lateral deslizable */
.side-nav {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  background: #000;
  color: white;
  transition: left 0.3s ease;
  z-index: 1040;
  overflow-y: auto;
}

.side-nav.open {
  left: 0;
}

/* Ajustar la posición del menú perfil desplegable */
.profile-dropdown a.dropdown-item {
  color: #333;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.profile-dropdown a.dropdown-item:hover {
  background-color: #f0f0f0;
}

/* Ocultar menú hamburguesa en desktop ya lo hace bootstrap con d-md-none */

/* Sidebar fijo desktop */
.chat-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #f8f9fa;
  border-right: 1px solid #ddd;
  padding: 1rem;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1050;
}

/* Contenido principal debe dejar espacio para sidebar */
.main-content {
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

/* Botón para ocultar sidebar */
#toggleChatSidebar {
  margin-bottom: 1rem;
}

/* Cuando sidebar está oculto */
.chat-sidebar.hidden {
  transform: translateX(-100%);
}

.main-content.expanded {
  margin-left: 0;
}

/* Mostrar solo en desktop (>= md = 768px) */
@media (max-width: 767.98px) {
  .chat-sidebar {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }

    .top-bar {
        background-color: #000;
        border-bottom: none;
    }

    body.chat-body {
      background-color: #000;
    }

    .chat-container {
      background-color: #000;
    }
  .side-nav {
    width: 320px;
    left: -320px;
  }

  .side-nav.open {
    left: 0;
  }
}


/* PROFILE  */
.profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;  /* aumentar para dar espacio a 3 barras de 10px + márgenes */
    cursor: pointer;
}

.menu-toggle .bar {
    background-color: #FFF;
    height: 3px; /* barras gruesas */
    width: 25px;
    border-radius: 2px;
    margin: 0;  /* quitar margen para mejor control */
}


/* Icono nuevo mensaje */
.new-message-icon {
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
}

.new-message-icon:hover {
  color: #0d6efd; /* azul bootstrap hover */
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#preloader .preloader-logo img {
  max-width: 200px;
  height: auto;
}

.accordion {
    --bs-accordion-border-color: rgb(60, 60, 60) !important;
}
