/* H44 · Acciones de Biblioteca en la cabecera.
   Conserva la identidad de BomberoFlash y evita duplicar herramientas de Administración. */

#headerActions {
  min-width: 0;
}

.bf-library-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bf-library-header-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  color: #334155;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.bf-library-header-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .09);
}

.bf-library-header-action:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .32);
  outline-offset: 2px;
}

.bf-library-header-action--folder svg {
  color: #d97706;
}

.bf-library-header-action--bulk {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.bf-library-header-action--bulk:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.bf-library-header-action--primary {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.bf-library-header-action--primary:hover {
  border-color: #1e293b;
  background: #1e293b;
}

@media (max-width: 767px) {
  #appMain > header > div:first-child {
    min-width: 0;
  }

  #crumbTitle {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bf-library-header-actions {
    gap: 4px;
  }

  #headerActions .bf-library-header-action {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0 !important;
    border-radius: 12px;
  }

  .bf-library-header-label {
    display: none;
  }
}

@media (max-width: 390px) {
  header.no-print {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  header.no-print > div:first-child {
    gap: 8px !important;
  }

  #crumbTitle {
    max-width: 76px;
  }

  #headerActions {
    gap: 4px !important;
  }

  #headerActions .bf-library-header-action {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bf-library-header-action {
    transition: none;
  }
}
