/* ==========================================================================
   ECOSYSTEM SCROLL PRO 2026 - OPTIMIZACION UNIVERSAL DE BARRAS DE DESPLAZAMIENTO
   AplicacionesMCom Space & Ecosistema AI SaaS
   Elimina barras redundantes, artefactos grises de Windows y doble scroll.
   ========================================================================== */

/* 1. Normalización Global y Control de Desbordamiento */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
}

/* 2. Scrollbar Moderno Universal para Motores WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
  background-color: transparent;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(59, 130, 246, 0.7);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* 3. Estandar W3C para Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

/* 4. Contenedores de Desplazamiento Limpios */
.scroll-container,
.output-box,
.json-viewer,
.modal-body,
.modal-markdown,
.history-table-container,
.code-block,
pre {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) rgba(15, 23, 42, 0.3);
  overscroll-behavior: contain;
}

/* 5. Utilidad para Ocultar Barra Preservando Funcionalidad de Desplazamiento */
.no-scrollbar {
  -ms-overflow-style: none; /* IE y Edge */
  scrollbar-width: none; /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari y Opera */
}

/* 6. Eliminacion de Barras Inútiles en Elementos de Solo Lectura o Ajustados */
.card,
.panel-card,
.hero-card,
.navbar,
header,
footer,
.controls-bar {
  overflow-x: clip;
}

/* 7. Desplazamiento Horizontal Elegante para Píldoras y Filtros */
.category-pills,
.framework-grid,
.output-tabs,
.tags-row {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-pills::-webkit-scrollbar,
.output-tabs::-webkit-scrollbar {
  display: none;
}
