/***
 * Gov.co (https://www.gov.co) - Gobierno de Colombia
 *  - Componente: barra accesibilidad
 *  - Version: 4.0.0
 */

/* Fuente iconografica */
@font-face {
  font-family: "govco-font";
  src: url("../fonts/govco-font-icons.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* ================== BARRA DE ACCESIBILIDAD ================== */
#barraAccesibilidad {
  height: auto;
  width: 48px;
  position: fixed;
  top: 35%;
  right: 0;
  background-color: #004884;
  border-radius: 10px 0 0 10px;
  opacity: 1;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 12px;
  padding-bottom: 20px;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

#barraAccesibilidad button {
  line-height: inherit;
}

/* ================== MODO OSCURO (gris) ================== */
body.modo-oscuro {
  background-color: #3a3a3a !important;
  color: #f5f5f5 !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Transiciones generales */
body.modo-oscuro p,
body.modo-oscuro h1,
body.modo-oscuro h2,
body.modo-oscuro h3,
body.modo-oscuro h4,
body.modo-oscuro h5,
body.modo-oscuro h6,
body.modo-oscuro span,
body.modo-oscuro div,
body.modo-oscuro section,
body.modo-oscuro article,
body.modo-oscuro .label-R,
body.modo-oscuro a,
body.modo-oscuro li,
body.modo-oscuro ul,
body.modo-oscuro #menuPrincipal,
body.modo-oscuro .LINK_MENU,
body.modo-oscuro #barra-superior-govco,
body.modo-oscuro .DIV_REDONDEADO_BIBLIOTECA,
body.modo-oscuro .DIV_CONTENIDO,
body.modo-oscuro table,
body.modo-oscuro input,
body.modo-oscuro textarea,
body.modo-oscuro select,
body.modo-oscuro .has-submenu ul,
body.modo-oscuro .menu-toggle{
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Links generales */
body.modo-oscuro a {
  color: #9ecbff !important;
}

/* ================== MENÚ (solo afecta en modo oscuro) ================== */

/* Fondo del menú en modo oscuro */
body.modo-oscuro #menu-R, 
body.modo-oscuro .header-logo-busqueda,
body.modo-oscuro .ui-grid-row,
body.modo-oscuro .navbar,
body.modo-oscuro .navbar-dark{
  background-color: #000 !important;
}

/*Fondo modo oscuro menu items*/ 
body.modo-oscuro #menu-R ul li a {
  background-color: #000 !important;
}

/* Texto del menú en modo oscuro → gris claro (NO blanco) */
body.modo-oscuro #menu-R a,
body.modo-oscuro .LINK_MENU {
  color: #fff !important;
  text-decoration: none !important;
  transition: color 0.18s ease, background-color 0.18s ease;
}

/* Hover en menú (oscuro) */
body.modo-oscuro #menu-R a:hover,
body.modo-oscuro .LINK_MENU:hover {
  color: #ffcc00 !important;
  background-color: #444 !important;
  border-radius: 4px;
}

/* Activo */
body.modo-oscuro #menu-R a:active,
body.modo-oscuro .LINK_MENU:active {
  color: #ffffff !important;
  background-color: #000 !important;
}

/* ================== SUBMENÚ (solo en modo oscuro) ================== */
body.modo-oscuro #menu-R ul {
  z-index: 100;
  list-style: none;
  padding: 0;
  margin: auto;
  list-style: none;
  width: 100%;
}

body.modo-oscuro #menu-R ul li:hover>ul {
  display: block;
}

body.modo-oscuro #menu-R ul ul li a {
  display: block;
  color: #ffffff !important;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  justify-content: flex-start;
}

body.modo-oscuro #menu-R ul ul li a:hover {
  background: #444 !important;
  color: #ffcc00 !important;
}

/* ================== TABLAS, INPUTS Y BLOQUES ================== */
body.modo-oscuro table {
  background-color: #000 !important;
  color: #f5f5f5 !important;
}

body.modo-oscuro th,
body.modo-oscuro td {
  border-color: #000 !important;
}

body.modo-oscuro input,
body.modo-oscuro textarea,
body.modo-oscuro select {
  background-color: #444 !important;
  color: #f5f5f5 !important;
  border: 1px solid #666 !important;
}

/* Bloques personalizados */
body.modo-oscuro .DIV_REDONDEADO_BIBLIOTECA,
body.modo-oscuro .DIV_CONTENIDO,
body.modo-oscuro #slider1_container,
body.modo-oscuro #header-gov,
body.modo-oscuro #footer-osc,
body.modo-oscuro #views,
body.modo-oscuro #arrows,
body.modo-oscuro #visitas,
body.modo-oscuro .carousel_visitas,
body.modo-oscuro .carousel__item_visitas,
body.modo-oscuro .css-button-shadow-border-sliding--sky,
body.modd-oscuro #barra-superior-govco,
body.modo-oscuro .menu-toggle,
body.modo-oscuro .idioma-icon-barra-superior-govco,
body.modo-oscuro .active ul,
body.modo-oscuro .has-submenu ul,
body.modo-oscuro .active ul li a{
  background-color: #000 !important;
  color: #f5f5f5 !important;
  border: 1px solid #555 !important;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.modo-oscuro .footer-govco,
body.modo-oscuro .footer-modern {
  background-color: #1a202c !important;
  color: #ffffff !important;
}

body.modo-oscuro .bg-light {
  background-color: #2d3748 !important;
}

body.modo-oscuro .text-dark {
  color: #ffffff !important;
}

body.modo-oscuro .text-muted {
  color: #a0aec0 !important;
}

body.modo-oscuro .text-primary {
  color: #60a5fa !important;
}

body.modo-oscuro .card {
  background-color: #2d3748 !important;
  border-color: #4a5568 !important;
  color: #ffffff !important;
}

/* ================== IFRAME ================== */
iframe {
  transition: transform 0.3s ease, filter 0.3s ease;
  transform-origin: top left;
}

body.modo-oscuro iframe {
  filter: invert(1) hue-rotate(180deg);
  background: #000 !important;
  border-radius: 6px;
}

/* ================== BOTONES ACCESIBILIDAD ================== */
.btn-accesibilidad {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-accesibilidad button {
  width: 40px;
  height: 40px;
  border: none;
  background: #004884;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.3s, color 0.3s;
  font-size: 15px;
}

/* Hover normal */
.btn-accesibilidad button:hover {
  background: #3366CC;
  transform: scale(1.1);
}

/* Etiquetas (labels flotantes) */
.btn-accesibilidad .label-R {
  text-align: left;
  position: absolute;
  background: #3366CC;
  color: #fff;
  line-height: normal !important;
  visibility: hidden;
  margin-left: -136px;
  font-family: Verdana,sans-serif !important;
  font-size: 14px;
  margin-top: -8px;
  opacity: 0;
  width: 182px;
  border-radius: 10px 0px 0px 10px;
  right: 48px;
  padding: 10px;
  pointer-events: none;
  transform: translateX(10px);
  transition: all 0.3s ease;
 }

/* Animación hover */
.btn-accesibilidad:hover .label-R {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.btn-accesibilidad:hover button {
  transform: translateX(0) scale(1.1);
}

/* ================== MODAL ================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Contenedor principal */
.modal-content {
  background: #fff;
  border-radius: 15px;
  padding: 30px;
  width: 70%;
  max-width: 800px;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  font-family: Verdana,sans-serif;
  color: #000;
}

/* Título */
.modal-content h2 {
  text-align: left;
  margin-bottom: 20px;
  font-size: 32px !important;
  color: #0d47a1;
}

/* Grid en dos columnas para las combinaciones */
.manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 30px;
  font-size: 15px;
  line-height: 1.5;
}

/* Footer con botón cerrar */
.modal-footer {
  margin-top: 20px;
  text-align: center;
}

/* Botón cerrar GOV.CO */
.btn-cerrar {
  background: #0d47a1;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-cerrar:hover {
  background: #1565c0;
}

/* ================== MODAL EN MODO OSCURO ================== */
body.modo-oscuro .modal-content {
  background: #2a2a2a !important;
  color: #f5f5f5 !important;
  border-radius: 15px;
  border: 1px solid #444 !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* Títulos en el modal */
body.modo-oscuro .modal-content h2 {
  color: #ffcc00 !important;
}

/* Botón cerrar dentro del modal */
body.modo-oscuro .modal-content .btn-cerrar {
  background: #444 !important;
  color: #ffcc00 !important;
  border: 1px solid #666 !important;
  transition: background 0.3s ease, color 0.3s ease;
}

body.modo-oscuro .modal-content .btn-cerrar:hover {
  background: #000 !important;
  color: #fff !important;
}

/* Scrollbar dentro del modal (oscuro) */
body.modo-oscuro .modal-content::-webkit-scrollbar {
  width: 8px;
}

body.modo-oscuro .modal-content::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 8px;
}

body.modo-oscuro .modal-content::-webkit-scrollbar-track {
  background: #2a2a2a;
}

/* ================== Screen Reader Only ================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
  #barraAccesibilidad {
    bottom: 20px;
    top: auto;
    right: 0;
    width: auto;
    height: 48px;
    flex-direction: row;
    border-radius: 10px 0 0 10px;
    padding: 0 10px;
    gap: 5px;
  }
  
  #barraAccesibilidad button {
    width: 35px;
    height: 35px;
  }
  
  .btn-accesibilidad .label-R {
    display: none;
  }
}
