/* Botón flotante de accesibilidad */
#accessibility-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1050;
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

#accessibility-btn img {
  width: 28px;
  height: 28px;
}

#accessibility-btn span[aria-hidden='true'] {
  font-size: 1.3rem;
  line-height: 1;
}

/* Capa oscura detrás del panel */
#accessibility-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

#accessibility-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Panel lateral de accesibilidad */
#accessibility-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  max-width: 320px;
  width: 85%;
  background: #fff;
  z-index: 1051;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

#accessibility-panel.open {
  transform: translateX(0);
}

#accessibility-panel .accessibility-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#accessibility-panel .accessibility-header h2 {
  font-size: 1rem;
  margin: 0;
}

#accessibility-panel .accessibility-body {
  padding: 1rem;
  overflow-y: auto;
}

/* Modos de accesibilidad (ejemplos) */
body.a11y-high-contrast {
  background: #000;
  color: #fff;
}

body.a11y-high-contrast a {
  color: #ff0;
}

body.a11y-underline-links a {
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  #accessibility-btn {
    bottom: 1rem;
    left: 1rem;
  }
}
/* =========================
      MODO OSCURO GLOBAL
   ========================= */

/* Fondo y texto general */
body.dark-mode {
  background-color: #000 !important;
  color: #fff !important;
}

/* Elementos principales del layout */
body.dark-mode main,
body.dark-mode .layout-wrapper,
body.dark-mode .container,
body.dark-mode .container-fluid,
body.dark-mode .card,
body.dark-mode .navbar,
body.dark-mode footer,
body.dark-mode #sub-header,
body.dark-mode #accessibility-panel,
body.dark-mode .sidecard {
  background-color: #000 !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Inputs y selects */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #111 !important;
  color: #fff !important;
  border-color: #444 !important;
}

/* Botones */
body.dark-mode .btn {
  background-color: #333 !important;
  color: #fff !important;
  border-color: #555 !important;
}

/* Evitar distorsionar imágenes/logos */
body.dark-mode img,
body.dark-mode svg,
body.dark-mode video {
  filter: none !important;
}

/* ====== MODALES ====== */

/* Fondo del contenido del modal (oscuro, pero no todo negro raro) */
body.dark-mode .modal-content,
body.dark-mode .modal-header,
body.dark-mode .modal-body,
body.dark-mode .modal-footer {
  background-color: #111 !important;
  color: #fff !important;
}

/* Backdrop del modal (oscurece fondo pero deja ver que hay algo detrás) */
body.dark-mode .modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.85) !important;
}
