/* ===== SIDEBAR CRITERIOS - Estilos independientes ===== */
/* Pensado para cargarse dentro del iframe (sidebar-criterios.html) */

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: transparent;
  font-family: 'Roboto', sans-serif;
}

.btn-toggle-sidebar-criterios {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 10px 16px;
  border: none;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(135deg, rgba(30, 90, 180, 0.95) 0%, rgba(20, 60, 140, 0.95) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease, box-shadow 0.3s ease;
}

.btn-toggle-sidebar-criterios:hover {
  background: linear-gradient(135deg, rgba(40, 110, 200, 0.95) 0%, rgba(30, 80, 160, 0.95) 100%);
  box-shadow: -4px 0 16px rgba(0, 100, 255, 0.4);
}

.btn-toggle-sidebar-criterios .material-icons {
  font-size: 1.4rem;
}

body.sidebar-criterios-open .btn-toggle-sidebar-criterios {
  right: 300px;
}

.sidebar-criterios-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-criterios-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.sidebar-criterios {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 90vw;
  height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.sidebar-criterios-open .sidebar-criterios {
  transform: translateX(0);
}

.sidebar-criterios__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(30, 90, 180, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-criterios__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-criterios__title .material-icons {
  font-size: 1.4rem;
}

.sidebar-criterios__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.sidebar-criterios__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-criterios__content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.sidebar-criterios__subtitle {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-criterios__list {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  line-height: 1.6;
}

.sidebar-criterios__list li {
  margin-bottom: 10px;
}

.sidebar-criterios__list li strong {
  color: #93c5fd;
}

.sidebar-criterios__list code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  color: #bfdbfe;
}

@media (max-width: 480px) {
  .sidebar-criterios {
    width: 100%;
    max-width: 100%;
  }
  body.sidebar-criterios-open .btn-toggle-sidebar-criterios {
    right: 100%;
    opacity: 0;
    pointer-events: none;
  }
  .btn-toggle-sidebar-label {
    display: none;
  }
}
